Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Manage release files from the CLI and browser

c51874492382d08085b6388cea898d0d60ab9375 · Keenan Nemetz · 17d ago · parent 214e7ea6

Manage release files from the CLI and browser

Move the attach form to its own page, add move/remove operations to the CLI and browser, and simplify the release detail page to notes, files, and source links.

server/routes.go +7−3

@@ -213,10 +213,14 @@ func (s *Server) repoRoutes(mux *http.ServeMux) {
213 213 mux.HandleFunc("GET /{name}/releases/{tag}/archive.tar", w.ReleaseTar)
214 214 mux.HandleFunc("GET /{name}/releases/{tag}/archive.tar.gz", w.ReleaseTarGz)
215 215 mux.HandleFunc("GET /{name}/releases/{tag}/artifacts/{path...}", w.ReleaseArtifact)
216 // Attaching is a write on the release it names, so the route sits with the
217 // other release writes and not with the artifact reads: a browser upload and
218 // `vole release attach` write the same pointers.
216 // File management is a set of release subpages, like the note and channel
217 // forms: the attach form is no longer embedded in the release page, and one
218 // attached file can be renamed, moved, or removed beside it.
219 mux.HandleFunc("GET /{name}/releases/{tag}/attach", w.ReleaseAttachPage)
219 220 mux.HandleFunc("POST /{name}/releases/{tag}/attach", w.AttachRelease)
221 mux.HandleFunc("GET /{name}/releases/{tag}/files/edit", w.ReleaseFileEditPage)
222 mux.HandleFunc("POST /{name}/releases/{tag}/files/edit", w.MoveReleaseFile)
223 mux.HandleFunc("POST /{name}/releases/{tag}/files/delete", w.DeleteReleaseFile)
220 224
221 225 // Channels. The channel name is one segment; the tree route takes the rest,
222 226 // so apt/ or yum/ are just directories in the target release. The list and its