Release tooling: --yes flag, desktop- tag prefix, push-race fix - #84
bryanroscoe wants to merge 2 commits into
Conversation
Skip the three confirmation gates with --yes/-y so the release can be cut from CI or an agent without a TTY. Piping 'yes' is still blocked by the auto-mode classifier; the flag is the sanctioned path.
- Tag prefix v2- -> desktop- (non-numeric, no longer doubles the semver). The workflow still accepts legacy v2-* tags. Everything human-facing now uses the bare semver: release title 'Shield Optimizer X.Y.Z', Homebrew version, and changelog headings (## X.Y.Z), with a fallback to the old prefixed heading for re-runs. - Fix the non-fast-forward push race between merge-updater and refresh-screenshots (both commit to the default branch in parallel) with rebase-and-retry before push — this is what failed the v2-2.1.0 gallery job.
|
Superseded in part by #114, which rebases two of these three changes onto current main — the push-race fix and What #114 leaves behind is the Suggest keeping this open for the rename alone once the beta has shipped, or closing it and redoing that piece against main. Written by Claude, Bryan's AI coding assistant, and posted on his behalf. |
Two of the three changes from #84, rebased onto current main. That PR is 89 commits behind and its third change — renaming the tag prefix from `v2-` to `desktop-` — is deliberately left out; see the PR description. **Push race.** `merge-updater` and `refresh-screenshots` both commit to the default branch and can finish at the same time, and neither rebased before pushing, so whichever lost got a non-fast-forward rejection. That is what failed the v2-2.1.0 gallery job. Both now rebase and retry, up to five times, then fail loudly. Verified the loop under `set -euo pipefail`: it succeeds on recovery, gives up after five, and the `[[ ]] && { exit 1; }` guard does not trip `set -e` on the non-final attempts. **`--yes` / `-y`.** Auto-confirms the three gates for non-interactive use. Piping `yes` into the script stays blocked, which is correct — this is the sanctioned way to skip the gates on purpose. The prompts collapse into one `confirm` helper; verified it proceeds under `--yes` and on a typed `y`, and aborts on `n` and on empty stdin, so it still fails closed.
Three release-pipeline changes (all touch the same release tooling):
1.
release.sh --yes/-y— auto-confirms the three gates (dirty-tree, bump+tag, push) for non-interactive / CI / agent use. Pipingyesis still blocked by the auto-mode classifier; the flag is the sanctioned path.2. Tag prefix
v2-→desktop-— removes thev2-2.xredundancy. The prefix is just the release-track namespace (keeps the desktop app's tags separate from v1's PowerShell tags); everything human-facing now uses the bare semver:Shield Optimizer 2.2.0(wasShield Optimizer v2-2.1.0)## 2.2.0v2-*tags /## v2-X.Y.Zheadings, so old tags can be re-run.raw.githubusercontentURL, independent of the tag name (verified).3. Push-race fix —
merge-updaterandrefresh-screenshotsboth commit to the default branch in parallel and neither rebased before pushing, so the second one lost with a non-fast-forward error (this is what failed the v2-2.1.0 gallery job). Both now rebase-and-retry before pushing.Validated: YAML parses,
release.shsyntax OK, and the changelog version-matching logic tested for bothdesktop-(bare-version heading) and legacyv2-(prefixed heading) tags. Thedesktop-prefix lives in oneTAG_PREFIXconstant in release.sh + the workflow trigger.