Rewrite release instructions as an ordered checklist
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b009ac3cbf
commit
c150ad844a
+30
-20
@@ -9,36 +9,46 @@ make race # go test -race ./...
|
|||||||
make vet fmt-check
|
make vet fmt-check
|
||||||
make benchmark # go test -bench
|
make benchmark # go test -bench
|
||||||
make fuzz # short fuzz runs of snapshot / treemap / filter
|
make fuzz # short fuzz runs of snapshot / treemap / filter
|
||||||
make release # cross-compiled binaries in bin/release
|
make release # release archives and packages in bin/release
|
||||||
```
|
```
|
||||||
|
|
||||||
## Releasing
|
## Releasing
|
||||||
|
|
||||||
|
Example for 1.2.0; substitute the real version throughout.
|
||||||
|
|
||||||
|
1. Update the version in `internal/brand/brand.go` and `docs/mapsize.1`,
|
||||||
|
and add a `## 1.2.0` section to CHANGELOG.md. Commit.
|
||||||
|
2. Tag and push:
|
||||||
```sh
|
```sh
|
||||||
git tag -a v1.0.0 -m "mapsize 1.0.0"
|
git tag -a v1.2.0 -m "mapsize 1.2.0"
|
||||||
make release # bin/release: archives, .deb/.rpm/.apk/Arch, SHA256SUMS
|
git push origin master v1.2.0
|
||||||
```
|
```
|
||||||
|
3. Build everything (archives, .deb/.rpm/.apk/Arch packages, SHA256SUMS
|
||||||
The version comes from `git describe` and is stamped into
|
into `bin/release`; the first run downloads `nfpm`):
|
||||||
`brand.Version`; untagged builds report the fallback in
|
|
||||||
`internal/brand/brand.go`. Packages need network access the first time
|
|
||||||
(`nfpm` is fetched with `go run`). Bump the version in `docs/mapsize.1` and
|
|
||||||
`brand.go` and add a CHANGELOG section before tagging.
|
|
||||||
|
|
||||||
### Homebrew
|
|
||||||
|
|
||||||
After pushing the tag:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make brew-formula # → bin/homebrew/mapsize.rb with the tarball's sha256
|
make release VERSION=v1.2.0
|
||||||
```
|
```
|
||||||
|
4. Publish the GitHub release with the changelog section as notes:
|
||||||
Copy the result to `Formula/mapsize.rb` in the tap repository
|
```sh
|
||||||
`github.com/andydixon/homebrew-tap`; users then run
|
awk '/^## 1.2.0/{f=1;next} /^## /{f=0} f' CHANGELOG.md > /tmp/notes.md
|
||||||
`brew install andydixon/tap/mapsize`. The formula builds from source with
|
gh release create v1.2.0 --title v1.2.0 --notes-file /tmp/notes.md bin/release/*
|
||||||
Go, stamps the version and installs the man page. Template:
|
```
|
||||||
|
5. Update Homebrew. This needs the tag pushed (step 2), because it
|
||||||
|
checksums GitHub's source tarball for that tag:
|
||||||
|
```sh
|
||||||
|
make brew-formula VERSION=v1.2.0 # writes bin/homebrew/mapsize.rb
|
||||||
|
git clone https://github.com/andydixon/homebrew-tap /tmp/tap
|
||||||
|
cp bin/homebrew/mapsize.rb /tmp/tap/Formula/mapsize.rb
|
||||||
|
git -C /tmp/tap commit -am "mapsize 1.2.0" && git -C /tmp/tap push
|
||||||
|
```
|
||||||
|
Users get it with `brew upgrade mapsize`. Template:
|
||||||
`packaging/homebrew/mapsize.rb.in`.
|
`packaging/homebrew/mapsize.rb.in`.
|
||||||
|
|
||||||
|
Always pass `VERSION=`: otherwise it comes from `git describe`, which only
|
||||||
|
matches the tag when HEAD is exactly the tagged commit. `make release` and
|
||||||
|
the Homebrew formula stamp the version into the binary; `make build` and
|
||||||
|
`go install` use the value in `brand.go`, which is why step 1 updates it.
|
||||||
|
|
||||||
The snapshot format is stable at version 1: a format change must bump
|
The snapshot format is stable at version 1: a format change must bump
|
||||||
`snapshot.Version` and keep the reader for version 1.
|
`snapshot.Version` and keep the reader for version 1.
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ go install github.com/andydixon/mapsize/cmd/mapsize@v1.0.0
|
|||||||
make build # → bin/mapsize
|
make build # → bin/mapsize
|
||||||
sudo make install # binary + man page under /usr/local (PREFIX=… to change)
|
sudo make install # binary + man page under /usr/local (PREFIX=… to change)
|
||||||
|
|
||||||
# Homebrew (macOS and Linux), once the tap is published
|
# Homebrew (macOS and Linux)
|
||||||
brew install andydixon/tap/mapsize
|
brew install andydixon/tap/mapsize
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user