diff --git a/AGENTS.md b/AGENTS.md index 04131d9..12ec3a2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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` tag on a commit of main, pushed by itself (`git push origin v`, 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` tag on a commit of main, pushed by itself (`git push origin v`, 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, with the Markdown file `` 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^` names it; read `git diff ..v`, 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-.dmg` and drag `Byre.app` to Applications; Macs already running get this through the app's updater. The disk image's SHA-256 is in `byre-.dmg.sha256`.", then a line `Full changes: https://g.fc.run/ai/byre/compare/...v`. + +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: diff --git a/docs/operations.md b/docs/operations.md index 9bdfd3b..c0e5d1c 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -127,7 +127,7 @@ A release is one notarized disk image, `byre-.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 ` (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` 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//`, and the script prints the release page. +`mac/release.sh ` publishes one, run on byre's host from a checkout whose `HEAD` carries a `v` 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 ``, 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//`, and the script prints the release page. It needs, on that Mac: diff --git a/mac/release.sh b/mac/release.sh index 22802c6..202a9fa 100755 --- a/mac/release.sh +++ b/mac/release.sh @@ -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"