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.

Rewrite documentation around reader tasks

d1f44d838966c0a4762073f12375ec7562582fdf · Keenan Nemetz · 21h ago · parent 9103f6a8

docs/releases.md +91−130

@@ -1,205 +1,166 @@
1 1 # Releases
2 2
3 A Vole release is an annotated Git tag. Its message contains the release notes,
4 its tree contains the source, and attached files provide binaries or other
5 downloads. Tags, notes, and attachment pointers travel with repository history.
3 Use a release to pair an annotated Git tag with Markdown notes, source archives,
4 and downloadable build outputs. The tag and notes travel with clones; attachment
5 pointers live on the `vole` branch and their bytes remain in instance storage.
6
7 Start from a repository clone. You need maintainer access to create and manage a
8 release.
6 9
7 10 ## Create a release
8 11
9 Write Markdown notes, create the tag, and push it:
12 Create an annotated tag with release notes, then push it:
10 13
11 14 ```sh
12 vole release create v1.0.0 -F notes.md
15 vole release create v1.0.0 -m "First stable release."
13 16 git push --follow-tags
14 17 ```
15 18
16 Plain Git creates the same release:
19 Use `-F <file>` instead of `-m` to read longer Markdown notes from a file.
20 `release create` refuses to overwrite an existing tag.
21
22 Plain Git creates the same kind of release:
17 23
18 24 ```sh
19 git tag -a v1.0.0 -F notes.md
25 git tag -a v1.0.0 -m "First stable release."
20 26 git push --follow-tags
21 27 ```
22 28
23 29 Use an annotated tag. A lightweight tag appears in the release list but has no
24 tag message or tagger and cannot carry attached files. `release create` refuses
25 to overwrite an existing tag.
30 tag message or tagger and cannot carry attached files.
26 31
27 A maintainer can instead use **Releases → New release** in the browser. Choose a
28 target from the repository's branches and tags, name the tag, and write the
29 notes; Vole creates an annotated tag with the signed-in account as tagger.
30 **Edit release** rewrites an annotated tag's message. A release is editable after
31 publication; see [Editing a release](#editing-a-release) for the one case that
32 freezes it.
32 In the browser, **Releases → New release** provides the same fields and creates
33 an annotated tag with the signed-in account as tagger.
33 34
34 ## Attach files
35 ## Attach build outputs
35 36
36 Push the tag first, then attach build outputs. A file is attached under its base
37 name; a directory is attached as a tree relative to the directory you name:
37 Push the tag first, then attach files from your build. A file keeps its base
38 name:
38 39
39 40 ```sh
40 41 vole release attach v1.0.0 dist/vole-linux-amd64 dist/vole-linux-arm64
41 42 ```
42 43
43 To publish a package layout, attach the directory that should become the
44 Attach a directory to preserve its relative paths. The directory becomes the
44 45 release root:
45 46
46 47 ```sh
47 48 vole release attach v1.0.0 dist
48 # publishes apt/Packages, yum/repodata/repomd.xml, pacman/x86_64/vole.db, ...
49
50 vole release attach v1.0.0 dist/apt
51 # publishes Packages, Packages.gz, and the .deb files at the root
52 49 ```
53 50
54 A path is slash-separated. Empty segments, `.`, `..`, backslashes, and control
55 characters are refused, and a path cannot be both a file and a directory.
51 For example, attaching `dist/` publishes `dist/apt/Packages` as `apt/Packages`.
52 Attaching `dist/apt/` instead publishes `Packages` at the release root. Use this
53 layout for package repositories or other multi-file downloads.
56 54
57 A maintainer can attach from the browser too: **Manage files** on the release
58 page opens a form that takes files, or a directory, and an optional directory to
59 publish them under. It writes the same pointers as the CLI, so a file attached in
60 the browser is indistinguishable from one attached by `vole release attach` —
61 including for a clone of the metadata branch. A browser upload is bounded by the
62 instance's per-object limit; attach a bigger set from the shell.
55 Vole uploads the bytes into shared storage and writes attachment pointers to the
56 `vole` branch. It refuses a pointer without an uploaded object, so a published
57 download cannot point at a missing file. Attaching identical content again
58 reuses the stored object.
63 59
64 Vole uploads the bytes into shared storage and writes pointers to the `vole`
65 branch. It refuses a pointer without an uploaded object, so a published download
66 cannot point at a missing file. Attaching identical content again reuses the
67 stored object.
60 A maintainer can also use **Manage files** on the release page. Browser uploads
61 use the same pointers and are bounded by the instance's per-object limit; attach
62 a larger set from the CLI.
68 63
69 ## Remove files
64 ## Download releases and files {: #download-source-archives }
70 65
71 Attached files can be removed after publication. A removal deletes the pointer,
72 which makes the bytes collectable once the garbage collector's grace period
73 passes. The release notes and source are untouched.
66 Each release page provides source archives and its attached files. You can also
67 construct their URLs directly:
74 68
75 69 ```sh
76 vole release remove v1.0.0 old-notes.txt
77 vole release remove v1.0.0 apt/Packages apt/Packages.gz
70 curl -O https://forge.example.com/demo/releases/v1.0.0/artifacts/vole-linux-amd64
71 curl -O https://forge.example.com/demo/releases/v1.0.0/archive.tar
72 curl -OJ https://forge.example.com/demo/releases/v1.0.0/archive.tar.gz
78 73 ```
79 74
80 A maintainer can remove a file from the browser too: the **remove** action beside
81 each file on the release page, and on the **Manage files** page, deletes the same
82 pointer the CLI does. The browser applies the same rules, including the channel
83 freeze described in [Editing a release](#editing-a-release).
75 Downloads support conditional requests and byte ranges for resuming large files.
76 Anonymous visitors receive `404` for releases in private repositories.
77
78 Vole generates source archives from the tagged tree on request. If the
79 repository uses Git LFS, the archive contains the stored large-file contents,
80 not LFS pointer files.
84 81
85 Download and verify a file, including one in a nested path:
82 ## Publish a stable channel
83
84 A channel is a stable URL that points to one annotated release. Move it when you
85 want users to receive a newer release:
86 86
87 87 ```sh
88 curl -O https://forge.example.com/demo/releases/v1.0.0/artifacts/vole-linux-amd64
89 curl -O https://forge.example.com/demo/releases/v1.0.0/artifacts/apt/Packages
90 sha256sum vole-linux-amd64
88 vole release channel set stable v1.0.0 -m "Recommended for production"
89 vole release channel list
91 90 ```
92 91
93 Downloads support conditional requests, `Content-Disposition: attachment`, and
94 byte ranges for resuming large files. Anonymous visitors receive `404` for files
95 in private repositories.
92 The channel page redirects to its target release. Paths below the channel serve
93 that release's files, so this URL keeps working when the channel moves:
96 94
97 ## Channels
95 ```sh
96 curl -O https://forge.example.com/demo/channels/stable/vole-linux-amd64
97 ```
98 98
99 A channel is a mutable alias for one annotated release. The channel is the
100 mutable part: moving it changes only which release its URL follows. While a
101 channel targets a release, that release cannot be edited — see
102 [Editing a release](#editing-a-release).
99 Channels are useful for package repositories too. Vole does not interpret apt,
100 yum, or pacman metadata; it serves the attached directory layout at the channel
101 URL. [Install](install.md#add-the-repository-by-hand) shows how Vole's own
102 `stable` channel becomes a package source.
103
104 Clear a channel without deleting its target release or files:
103 105
104 106 ```sh
105 vole release channel set stable v1.0.0 -m "Recommended for production"
106 vole release channel list
107 107 vole release channel clear stable
108 108 ```
109 109
110 A maintainer signed in to the browser can create or move a channel from the
111 Channels section of the **Releases** tab, or by following the **edit** link on a
112 channel row, and clear one from that section. The form chooses from the
113 repository's annotated releases rather than accepting a tag as free text. It
114 applies the same rules as the CLI: the name is lowercase letters, digits, and
115 dashes, the target must be annotated, and the move is recorded in the audit log.
110 Channel names use lowercase letters, digits, and dashes. Moving or clearing a
111 channel requires maintainer access and is recorded in the audit log. Channels
112 are server-side state in `data/instance.db`, not Git refs, so include them in an
113 [instance backup](backup-and-restore.md#back-up-an-instance).
116 114
117 `/<repo>/channels/stable` redirects to the target release page.
118 `/<repo>/channels/stable/<path>` serves a file attached to that release:
115 !!! warning "A channel freezes its target"
116 While a channel targets a release, Vole refuses ordinary changes to that
117 release's notes and files. Move the channel to another release before editing
118 it. A repository admin can override the freeze, and Vole records that override
119 in the audit log. A missing target, or a tag object that no longer matches the
120 recorded target, makes the channel dangling and returns `404`.
119 121
120 ```sh
121 curl -O https://forge.example.com/demo/channels/stable/apt/Packages
122 ```
122 ## Edit a release or remove files
123 123
124 The forge does not know about apt, yum, or any other client. A package layout is
125 just a directory in the release tree; the release workflow decides the paths and
126 the client points at the channel. Vole's own release publishes signed `apt/`,
127 `yum/`, and per-architecture `pacman/<arch>/` layouts, so its `stable` channel
128 is a package source for all three clients;
129 [Install](install.md#add-the-repository-by-hand) has the source lines.
130 A private repository serves `404` to anonymous clients, so a package manager
131 needs a public repository or a mirror. A channel is server-side state in
132 `data/instance.db`, not a Git commit: it is consumed from the instance URL, it
133 needs maintain access to move, and the move is recorded in the audit log. Back it
134 up with the other authoritative databases. A channel whose target tag is missing
135 or no longer matches the recorded tag object is shown as dangling and resolves to
136 `404`.
124 Use **Edit release** in the browser to revise an annotated tag's notes. Editing
125 the notes re-tags the same source commit, which changes the tag object. A clone
126 that already fetched the old tag needs this command to fetch the new object:
137 127
138 ## Download source archives
128 ```sh
129 git fetch --tags --force
130 ```
139 131
140 Each release page provides tar and gzip source downloads:
132 Remove attached files by their published paths:
141 133
142 134 ```sh
143 curl -O https://forge.example.com/demo/releases/v1.0.0/archive.tar
144 curl -OJ https://forge.example.com/demo/releases/v1.0.0/archive.tar.gz
135 vole release remove v1.0.0 old-notes.txt
136 vole release remove v1.0.0 apt/Packages apt/Packages.gz
145 137 ```
146 138
147 Vole generates archives from the tagged tree on request and uses the tag id as
148 the `ETag`. Git LFS entries remain pointer files in source archives; the release
149 page warns when a repository uses LFS.
139 Removal deletes only the attachment pointer; release notes and source are
140 untouched. The bytes become collectable after the garbage collector's grace
141 period. The browser's **Manage files** page applies the same rules, including the
142 channel freeze.
150 143
151 144 ## Build a release in CI
152 145
153 A tag workflow can build and attach files with `release: true`. A glob publishes
154 relative to its static root; a directory publishes its tree relative to the
155 directory:
146 A tag workflow can attach build outputs with `release: true`:
156 147
157 148 ```yaml
158 149 artifacts:
159 150 - path: dist/*
160 151 release: true
161 # or, for a package layout:
162 # - path: dist/apt
163 # release: true # Packages, Packages.gz, the .deb files, ...
164 # - path: dist
165 # release: true # apt/Packages, yum/repodata/repomd.xml, pacman/...
166 ```
167
168 The workflow writes the same attachment pointers as `vole release attach`. See
169 [Build a release](workflows.md#build-a-release) for a complete trigger and job.
170
171 ## Editing a release
172
173 A release is mutable. Its notes can be edited, files can be added, and an
174 attached path can be replaced or removed. Editing the notes re-tags the same
175 commit, so the tag object changes: a clone that already fetched that tag keeps
176 the old notes until `git fetch --tags --force`. Source archives use the tag
177 object as their `ETag`, so an edited release re-downloads its tarball even though
178 the tree did not change.
179
180 The one exception is a channel. A channel records the tag name and the tag
181 object, because it is the promise that one URL keeps serving one release. While a
182 channel targets a release, Vole refuses every change to it — notes, additions,
183 replacements, and removals — until the channel names another release:
184
185 ```sh
186 vole release channel set stable v1.0.1 -m "Recommended for production"
187 # now v1.0.0 can be edited again
188 152 ```
189 153
190 The same rule applies to a push and to the browser, so a channel cannot be worked
191 around by editing with the CLI. An admin override is recorded in
192 `data/audit.log`.
154 A glob publishes paths relative to its static root. A directory publishes its
155 tree relative to that directory, just like `vole release attach`. The workflow
156 writes the same attachment pointers as the CLI.
193 157
194 Adding, replacing, or removing a file rewrites the pointers on the `vole`
195 branch. Release pointers participate in storage reachability, so `vole admin gc`
196 retains an object only while a pointer names it: removing the last pointer to a
197 file makes its bytes collectable after the grace period.
158 See [Build a release](workflows.md#build-a-release) for a complete tag trigger
159 and job.
198 160
199 161 ## Next
200 162
201 - [Install](install.md) — install and upgrade Vole from a channel, a package
202 file, or a release binary.
203 - [Packages and upgrades](packaging.md) — manage Vole's installed packages.
204 163 - [Workflows](workflows.md#build-a-release) — automate releases from annotated
205 164 tags.
165 - [LFS and file locking](lfs.md) — store large source assets and release files.
166 - [Install](install.md) — use Vole's stable channel as an installation source.