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.
Publish release and run artifacts as file trees
5f2a0b0a7f84ec1bb43af5213e5c788039b72222 · Keenan Nemetz · 20d ago · parent 6d574bec
Publish release and run artifacts as file trees Release pointers and run outputs are now slash-separated paths. A flat name is a one-segment path, so every existing release, pointer, URL, and workflow that uses dist/* keeps working. - metadata validates artifact paths, lists and loads them recursively, and refuses a tag that would make the tag/path boundary ambiguous - vole release attach keeps a directory's relative paths; a plain file keeps its base name - a workflow match is published relative to the declaration's static root, so dist/* stays flat while dist/*/* keeps one directory level - release and run download routes accept nested paths; Content-Disposition still saves the base name - one internal rule is shared by the pointer writer, metadata validator, run record, CLI, and routes so they cannot disagree Refs: 01M7BPH6RRPK2934FCHVJPQNGY
server/web/releases.go +7−3
| @@ -164,7 +164,11 @@ func (w *Web) ReleaseArtifact(rw http.ResponseWriter, r *http.Request) { | |||
| 164 | 164 | w.notFound(rw, r) | |
| 165 | 165 | return | |
| 166 | 166 | } | |
| 167 | name := r.PathValue("artifact") | ||
| 167 | name := r.PathValue("path") | ||
| 168 | if err := metadata.ValidArtifactPath(name); err != nil { | ||
| 169 | w.notFound(rw, r) | ||
| 170 | return | ||
| 171 | } | ||
| 168 | 172 | artifacts := w.releaseArtifacts(r, m, t.Name) | |
| 169 | 173 | var art *metadata.Artifact | |
| 170 | 174 | for i := range artifacts { | |
| @@ -194,11 +198,11 @@ func (w *Web) ReleaseArtifact(rw http.ResponseWriter, r *http.Request) { | |||
| 194 | 198 | rw.Header().Set("Content-Type", artifactType(name)) | |
| 195 | 199 | rw.Header().Set("X-Content-Type-Options", "nosniff") | |
| 196 | 200 | rw.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%q", | |
| 197 | releaseSafe(name))) | ||
| 201 | releaseSafe(path.Base(name)))) | ||
| 198 | 202 | rw.Header().Set("Cache-Control", w.downloadCacheControl(m)) | |
| 199 | 203 | // ServeContent handles Range and the conditional request against the ETag | |
| 200 | 204 | // above, which is what makes a 100 MiB artifact resumable. | |
| 201 | http.ServeContent(rw, r, releaseSafe(name), time.Time{}, f) | ||
| 205 | http.ServeContent(rw, r, releaseSafe(path.Base(name)), time.Time{}, f) | ||
| 202 | 206 | _ = size | |
| 203 | 207 | } | |
| 204 | 208 | ||