From a8623ac447822ebf056e08a6e5b03d95b3642f5f Mon Sep 17 00:00:00 2001 From: Paul Glover Date: Mon, 10 Aug 2026 17:29:21 -0400 Subject: [PATCH] Write down how to cut a release Two things that are only obvious once you have got them wrong: the tag has to come first, because `make deb` reads the version out of `git describe` and a build from an untagged or dirty tree names itself after the previous release; and `make deb` on its own is amd64 only, which quietly ships a release that a Pi cannot install. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01T4oAqvh4CPXFK2uWJnSXpa --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 9e9f02b..a8edfa9 100644 --- a/README.md +++ b/README.md @@ -435,6 +435,36 @@ go vet ./... make deb # proves nfpm.yaml still packages ``` +## Cutting a release + +The version in the package comes from `git describe`, so the tag is the first +step rather than the last — build before tagging and the `.deb` is named after +the previous release. + +```bash +git checkout main && git pull # from a clean tree: --dirty + # would land in the version +git tag -a vX.Y.Z -m "vX.Y.Z" +git push origin vX.Y.Z + +make deb # amd64 +make deb ARCH=arm64 # and arm64 +( cd dist && shasum -a 256 *.deb > SHA256SUMS ) + +gh release create vX.Y.Z --prerelease \ + --title "vX.Y.Z" --notes "…" \ + dist/randomimageviewer_X.Y.Z_amd64.deb \ + dist/randomimageviewer_X.Y.Z_arm64.deb \ + dist/SHA256SUMS +``` + +Both architectures, even though the deployment this was written for is amd64: +`make deb` alone quietly produces an amd64-only release, and a Pi is an obvious +place to run this. + +Drop `--prerelease` once a version has run somewhere other than the machine it +was written on. + ## License MIT — see [LICENSE](LICENSE).