Release notes written from the diffs, not commit subjects
This commit is contained in:
@@ -24,7 +24,15 @@ What to expect:
|
||||
|
||||
## Releasing
|
||||
|
||||
A release is a deploy that is uploaded, and goes to every Mac through the app's updater. Make one only when the owner asks. It needs a `v<version>` tag on a commit of main, pushed by itself (`git push origin v<version>`, never moving or recreating a tag), and a clean checkout at that tag on iso, where `mac/release.sh` checks the tag, runs `mac/package.sh`, and publishes the image, its `.sha256` and `appcast.xml` as the release on g.fc.run. `docs/operations.md`, "Releases", has the details.
|
||||
A release is a deploy that is uploaded, and goes to every Mac through the app's updater. Make one only when the owner asks. It needs a `v<version>` tag on a commit of main, pushed by itself (`git push origin v<version>`, never moving or recreating a tag), and a clean checkout at that tag on iso, where `mac/release.sh <notes>` checks the tag, runs `mac/package.sh`, and publishes the image, its `.sha256` and `appcast.xml` as the release on g.fc.run, with the Markdown file `<notes>` as its notes. `docs/operations.md`, "Releases", has the details.
|
||||
|
||||
Before running it, write the notes yourself from the diffs since the previous tag (`git describe --tags --abbrev=0 v<version>^` names it; read `git diff <previous>..v<version>`, not just the commit subjects). Write the file outside the checkout, so the tree stays clean. It is a changelog for people who use byre, in this shape:
|
||||
|
||||
- `## New`: each user-visible feature as a bullet, a bold short name and then what it does and anything needed to use it.
|
||||
- `## Fixed`: each user-visible bug fix as a bullet, a bold short name and then what now works.
|
||||
- `## Install`: "Download `byre-<version>.dmg` and drag `Byre.app` to Applications; Macs already running <previous version> get this through the app's updater. The disk image's SHA-256 is in `byre-<version>.dmg.sha256`.", then a line `Full changes: https://g.fc.run/ai/byre/compare/<previous>...v<version>`.
|
||||
|
||||
Leave out changes no user sees (refactors, docs, tagging and deploy commits), and leave out a section with nothing in it. v0.1.1's notes (`https://g.fc.run/ai/byre/releases/tag/v0.1.1`) are the model.
|
||||
|
||||
When the owner tells the lead "deploy byre", or anything that means the same, that is the owner asking for both the deploy and the discard below. The lead:
|
||||
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ A release is one notarized disk image, `byre-<version>.dmg`, holding `Byre.app`:
|
||||
|
||||
A deploy is that image installed rather than published: `mac/deploy.sh` runs `package.sh`, installs the image's app with `mac/install.sh <dmg>` (mounts the image, copies `Byre.app` to `/Applications/Byre.app.new`, removes the old bundle and moves the new one into place, so nothing running from the old bundle has its files written over; it prints the installed `ByreCommit`), and restarts the service with `launchctl kickstart -k`. Client Macs get the same image through the client tools and `install.sh` (`AGENTS.md`, "Deploying"). A deployed build's `CFBundleVersion` is at least the last release's, so the updater never offers to go back to it.
|
||||
|
||||
`mac/release.sh` publishes one, run on byre's host from a checkout whose `HEAD` carries a `v<version>` tag already pushed to `origin`, with a clean tree; it fetches the tag from `origin` and stops unless it names `HEAD`, then runs `package.sh`. Last, it creates the release as a draft through the Gitea API (`POST /api/v1/repos/ai/byre/releases`, notes the commit subjects since the previous tag), uploads the image, its `.sha256` and `appcast.xml` as assets, and only then publishes it (`PATCH` with `draft: false`), so the `latest` release always has its appcast. A run that fails part way leaves the draft on the releases page; delete it there before running again. Everything lands in `mac/.build/release/<version>/`, and the script prints the release page.
|
||||
`mac/release.sh <notes>` publishes one, run on byre's host from a checkout whose `HEAD` carries a `v<version>` tag already pushed to `origin`, with a clean tree; it fetches the tag from `origin` and stops unless it names `HEAD`, then runs `package.sh`. Last, it creates the release as a draft through the Gitea API (`POST /api/v1/repos/ai/byre/releases`, its notes the Markdown file `<notes>`, which the releasing agent writes from the diffs since the previous tag, as `AGENTS.md`, "Releasing", describes), uploads the image, its `.sha256` and `appcast.xml` as assets, and only then publishes it (`PATCH` with `draft: false`), so the `latest` release always has its appcast. A run that fails part way leaves the draft on the releases page; delete it there before running again. Everything lands in `mac/.build/release/<version>/`, and the script prints the release page.
|
||||
|
||||
It needs, on that Mac:
|
||||
|
||||
|
||||
+1
-6
@@ -17,17 +17,12 @@ if [ "$(git -C "$root" rev-parse "FETCH_HEAD^{commit}")" != "$(git -C "$root" re
|
||||
exit 1
|
||||
fi
|
||||
token=$(security find-generic-password -s byre-release -w)
|
||||
notes=$(cat "$1")
|
||||
|
||||
"$mac/package.sh"
|
||||
out=$mac/.build/release/$version
|
||||
dmg=byre-$version.dmg
|
||||
|
||||
previous=$(git -C "$root" describe --tags --abbrev=0 "$tag^" || true)
|
||||
if [ -n "$previous" ]; then
|
||||
notes=$(git -C "$root" log --format='- %s' "$previous..$tag")
|
||||
else
|
||||
notes="First release."
|
||||
fi
|
||||
request=$out/release.json
|
||||
plutil -create xml1 "$request"
|
||||
plutil -insert tag_name -string "$tag" "$request"
|
||||
|
||||
Reference in New Issue
Block a user