Skip to content

Release tooling: --yes flag, desktop- tag prefix, push-race fix - #84

Open
bryanroscoe wants to merge 2 commits into
mainfrom
chore/release-non-interactive
Open

bryanroscoe wants to merge 2 commits into
mainfrom
chore/release-non-interactive

Conversation

@bryanroscoe

@bryanroscoe bryanroscoe commented Jun 22, 2026

Copy link
Copy Markdown
Owner

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. Piping yes is still blocked by the auto-mode classifier; the flag is the sanctioned path.

2. Tag prefix v2-desktop- — removes the v2-2.x redundancy. 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:

  • Release title: Shield Optimizer 2.2.0 (was Shield Optimizer v2-2.1.0)
  • Homebrew cask version + changelog headings: ## 2.2.0
  • The workflow still triggers on and parses legacy v2-* tags / ## v2-X.Y.Z headings, so old tags can be re-run.
  • Auto-update is unaffected: the updater endpoint is a fixed raw.githubusercontent URL, independent of the tag name (verified).

3. Push-race fixmerge-updater and refresh-screenshots both 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.sh syntax OK, and the changelog version-matching logic tested for both desktop- (bare-version heading) and legacy v2- (prefixed heading) tags. The desktop- prefix lives in one TAG_PREFIX constant in release.sh + the workflow trigger.

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.
@bryanroscoe bryanroscoe changed the title release.sh: --yes for non-interactive runs Release tooling: --yes flag, desktop- tag prefix, push-race fix Jun 22, 2026
@bryanroscoe

Copy link
Copy Markdown
Owner Author

Superseded in part by #114, which rebases two of these three changes onto current main — the push-race fix and --yes. This PR is 89 commits behind and conflicts in v2/release.sh.

What #114 leaves behind is the v2-desktop- tag rename, deliberately. It is worth doing, just not bundled with a bug fix and not immediately before a release: the Homebrew bump-tap job derives the cask from the tag, the release-decision packet and CHANGELOG are written throughout in v2-X.Y.Z terms, and the claim that auto-update is unaffected — plausible, and probably right — is exactly the kind of thing that would silently break every existing install if it were wrong.

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.

bryanroscoe added a commit that referenced this pull request Sep 17, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant