Skip to content

Commit 9811573

Browse files
authored
Merge pull request git-lfs#5920 from chrisd8088/update-release-docs-scripts
Update release process documentation and scripts
2 parents 6307096 + ab26a63 commit 9811573

File tree

3 files changed

+52
-27
lines changed

3 files changed

+52
-27
lines changed

docs/howto/release-git-lfs.md

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ We package several artifacts for each tagged release. They are:
3636
| git-lfs-linux-amd64-v@{version}.tar.gz | linux (generic) | amd64 |
3737
| git-lfs-linux-arm-v@{version}.tar.gz | linux (generic) | arm |
3838
| git-lfs-linux-arm64-v@{version}.tar.gz | linux (generic) | arm64 |
39+
| git-lfs-linux-loong64-v@{version}.tar.gz | linux (generic) | loong64 |
3940
| git-lfs-linux-ppc64le-v@{version}.tar.gz | linux (generic) | ppc64le |
41+
| git-lfs-linux-riscv64-v@{version}.tar.gz | linux (generic) | riscv64 |
4042
| git-lfs-linux-s390x-v@{version}.tar.gz | linux (generic) | s390x |
41-
| git-lfs-linux-loong64-v@{version}.tar.gz | linux (generic) | loong64 |
4243

4344
2. `git-lfs-windows-v@{release}-@{arch}.zip` for the following values:
4445

@@ -73,7 +74,12 @@ Git LFS in the `vM.N`-series, unless `N` is also equal to zero, in which
7374
case we are releasing a MAJOR version. Conversely, if `P` is not equal
7475
to zero, we are releasing a PATCH version.
7576

76-
1. First, we write the release notes and do the housekeeping required to
77+
1. Upgrade the Go version used in the `git-lfs/build-dockers` repository
78+
to the latest available patch release with the same major and minor
79+
version numbers as the Go version used in this repository's GitHub
80+
Actions workflows.
81+
82+
2. Write the release notes and do the housekeeping required to
7783
indicate a new version. For a MAJOR or MINOR version, we start with
7884
a `main` branch which is up to date with the latest changes from the
7985
remote and then checkout a new `release-next` branch from that base.
@@ -94,7 +100,7 @@ to zero, we are releasing a PATCH version.
94100
The `changelog` script will write a portion of the new CHANGELOG to
95101
stdout, which you should copy and paste into `CHANGELOG.md`, along with
96102
an H2-level heading containing the new version and the expected release
97-
date. This heading should be consistent with the exising style in the
103+
date. This heading should be consistent with the existing style in the
98104
document.
99105

100106
For a MAJOR release, use `script/changelog v(M-1).L.0...HEAD`, where
@@ -108,6 +114,11 @@ to zero, we are releasing a PATCH version.
108114
* Optionally write 1-2 paragraphs summarizing the release and calling
109115
out community contributions.
110116

117+
* Call out any changes in the operating system versions required
118+
by the new release, as well as any differences in the set of Linux
119+
platforms for which we build release packages. Check for any
120+
new platform requirements from the version of Go in use.
121+
111122
* If we are releasing a MAJOR or MINOR version and not a PATCH, and
112123
if the most recent non-PATCH release was followed by a series of one
113124
or more PATCH releases, include any changes listed in the CHANGELOG
@@ -129,7 +140,7 @@ to zero, we are releasing a PATCH version.
129140
$ git commit -m 'release: vM.N.P'
130141
```
131142

132-
2. Then, push the `release-next` branch and create a pull request with your
143+
3. Push the `release-next` branch and create a pull request with your
133144
changes from the branch. If you're building a MAJOR or MINOR release,
134145
set the base to the `main` branch. Otherwise, set the base to the
135146
`release-M.N` branch.
@@ -168,7 +179,7 @@ to zero, we are releasing a PATCH version.
168179
the workflow succeeds (excepting the Packagecloud upload step, which
169180
will be skipped).
170181

171-
3. Once approved and verified, merge the pull request you created in the
182+
4. Once approved and verified, merge the pull request you created in the
172183
previous step. Locally, create a GPG-signed tag on the merge commit called
173184
`vM.N.P`:
174185

@@ -194,7 +205,7 @@ to zero, we are releasing a PATCH version.
194205
release: vM.N.P
195206
```
196207

197-
4. Push the tag, via:
208+
5. Push the tag, via:
198209

199210
```ShellSession
200211
$ git push origin vM.N.P
@@ -205,28 +216,29 @@ to zero, we are releasing a PATCH version.
205216
done, you'll end up with a draft release in the repository for the version
206217
in question.
207218

208-
5. From the command line, finalize the release process by signing the release:
219+
6. From the command line, finalize the release process by signing the release:
209220

210221
```ShellSession
211222
$ script/upload --finalize vM.N.P
212223
```
213224

214-
Note that this script requires GnuPG as well as Ruby (with the OpenSSL
215-
gem) and several other tools. You will need to provide your GitHub
216-
credentials in your `~/.netrc` file or via a `GITHUB_TOKEN` environment
217-
variable.
225+
Note that this script requires GnuPG, with your signing key configured,
226+
as well as Ruby 3.x, the OpenSSL Ruby gem, and several other tools,
227+
including the GNU coreutils version of `b2sum(1)`. You will need to
228+
provide your GitHub credentials in your `~/.netrc` file or via a
229+
`GITHUB_TOKEN` environment variable.
218230

219231
If you want to inspect the data before approving it, pass the `--inspect`
220232
option, which will drop you to a shell and let you look at things. If the
221233
shell exits successfully, the build will be signed; otherwise, the process
222234
will be aborted.
223235

224-
6. Publish the release on GitHub, assuming it looks correct.
236+
7. Publish the release on GitHub, assuming it looks correct.
225237

226-
7. Move any remaining items out of the milestone for the current release to a
238+
8. Move any remaining items out of the milestone for the current release to a
227239
future release and close the milestone.
228240

229-
8. Update the `_config.yml` file in
241+
9. Update the `_config.yml` file in
230242
[`git-lfs/git-lfs.github.com`](https://github.com/git-lfs/git-lfs.github.com),
231243
similar to the following:
232244

@@ -243,7 +255,8 @@ to zero, we are releasing a PATCH version.
243255
url: "https://git-lfs.com"
244256
```
245257

246-
9. Create a GitHub PR to update the Homebrew formula for Git LFS with
258+
10. If Homebrew does not automatically update within a few hours,
259+
create a GitHub PR to update the Homebrew formula for Git LFS with
247260
the `brew bump-formula-pr` command on a macOS system. The SHA-256 value
248261
should correspond with the packaged artifact containing the new
249262
release's source files which is available at the given URL:
@@ -262,7 +275,12 @@ When building a PATCH release, we cherry-pick merges from `main` to the
262275
`vM.N` release branch, creating the branch first if it does not exist,
263276
and then use that branch as the base for the PATCH release.
264277

265-
1. If the `release-M.N` branch does not already exist, create it from
278+
1. Upgrade or downgrade the Go version used in the `git-lfs/build-dockers`
279+
repository to the latest available patch release with the same major
280+
and minor version numbers as the Go version used to build the Git LFS
281+
`vM.N.(P-1)` release.
282+
283+
2. If the `release-M.N` branch does not already exist, create it from
266284
the corresponding MINOR release tag (or MAJOR release tag, if no
267285
MINOR releases have been made since the last MAJOR release):
268286

@@ -275,22 +293,22 @@ and then use that branch as the base for the PATCH release.
275293
the `release-M.N` branch, and ensure that you have the latest changes
276294
from the remote.
277295

278-
2. Gather a set of potential candidates to backport to the `release-M.N`
296+
3. Gather a set of potential candidates to backport to the `release-M.N`
279297
branch with:
280298

281299
```ShellSession
282300
$ git log --merges --first-parent vM.N.(P-1)...main
283301
```
284302

285-
3. For each merge that you want to backport, run:
303+
4. For each merge that you want to backport, run:
286304

287-
```ShellSession
288-
$ git cherry-pick -m1 <SHA-1>
289-
```
305+
```ShellSession
306+
$ git cherry-pick -m1 <SHA-1>
307+
```
290308

291-
This will cherry-pick the merge onto your release branch, using
292-
the `-m1` option to specify that the first parent of the merge
293-
corresponds to the mainline.
309+
This will cherry-pick the merge onto your release branch, using
310+
the `-m1` option to specify that the first parent of the merge
311+
corresponds to the mainline.
294312

295-
4. Then follow the [guidelines](#building-a-release) above, using the
296-
`release-M.N` branch as the base for the new PATCH release.
313+
5. Then follow the [guidelines](#building-a-release) above, using the
314+
`release-M.N` branch as the base for the new PATCH release.

script/hash-files

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ class Hasher
3535
end
3636
end
3737

38+
unless RUBY_VERSION.split(".", 2)[0].to_i >= 3
39+
STDERR.puts "Ruby version must be at least 3.0"
40+
exit(1)
41+
end
42+
3843
results = []
3944
ARGV.each do |file|
4045
f = File.open(file)

script/upload

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ verify_assets () {
294294
if command -v sha3sum >/dev/null 2>&1
295295
then
296296
say "Checking assets for integrity with SHA-3..."
297-
(cd "$dir" && gpg -d hashes.asc | grep 'SHA3-' | sha3sum -c)
297+
(cd "$dir" && gpg -d hashes.asc | grep 'SHA3-256' | sed 's/.*(\(.*\)) = \(.*\)$/\2 \1/' | sha3sum -a 256 -c)
298+
(cd "$dir" && gpg -d hashes.asc | grep 'SHA3-384' | sed 's/.*(\(.*\)) = \(.*\)$/\2 \1/' | sha3sum -a 384 -c)
299+
(cd "$dir" && gpg -d hashes.asc | grep 'SHA3-512' | sed 's/.*(\(.*\)) = \(.*\)$/\2 \1/' | sha3sum -a 512 -c)
298300
fi
299301
if command -v b2sum >/dev/null 2>&1
300302
then

0 commit comments

Comments
 (0)