Skip to content

fix: ship the relocation fix to existing installs, document the real release flow - #29

Merged
cloudsmith-iduffy merged 3 commits into
mainfrom
fix/eng-13693-release-tooling
Jul 31, 2026
Merged

fix: ship the relocation fix to existing installs, document the real release flow#29
cloudsmith-iduffy merged 3 commits into
mainfrom
fix/eng-13693-release-tooling

Conversation

@cloudsmith-iduffy

Copy link
Copy Markdown
Contributor

Follow-up to #28. Three small changes, no new tooling.

revision 1

The tap tracks the CLI's version, so a formula-only fix has no version of its own to ship under. Homebrew's revision covers exactly that: the package becomes 1.20.2_1 while the CLI still reports 1.20.2, so brew sees an upgrade and existing installs move onto the fixed formula.

Verified: brew outdated reports (1.20.2) < 1.20.2_1, brew upgrade reinstalls, brew style and brew audit stay clean.

Without it, anyone already on 1.20.2 keeps a keg built by the failed relocation — which aborts on the first failure, so the bundle is left partially rewritten.

publish-homebrew removes the line on the next release, since it overwrites the formula from its template. That is the correct lifetime: a revision belongs to one CLI version.

Release notes rollback instructions

They told users to roll back with brew install --formula ./cloudsmith-cli.rb, which current Homebrew refuses:

Error: Homebrew requires formulae to be in a tap, rejecting: ./cloudsmith-cli.rb

Now points at the pinned cloudsmith-cli@<version> formulae, which are installable, linkable and pinnable. Note this workflow only triggers on v* tags and the release automation opens a pull request without tagging, so it has not run since v1.14.0 — the fix is correct but dormant unless tagging resumes.

CONTRIBUTING.md and scripts/bump-cloudsmith-cli.sh

CONTRIBUTING documented the bump helper as the standard release process. That is no longer true — publish-homebrew in the CLI repo has owned this formula since 1.20.1 — and the helper had also stopped working: run against the current formula it aborts with Could not find formula url line, because its regexes expect a two-space indent while the urls now sit inside if OS.mac? branches. It also used sub against four url/sha256 pairs and never touched the version stanza, which is why recent bumps were hand-authored.

Following the documented process would have failed, so the helper is removed rather than repaired, and CONTRIBUTING now records what actually matters:

🤖 Generated with Claude Code

cloudsmith-iduffy and others added 3 commits July 31, 2026 15:41
The release notes told users to roll back with `brew install --formula
./cloudsmith-cli.rb`, which current Homebrew refuses outright:

  Error: Homebrew requires formulae to be in a tap, rejecting: ./cloudsmith-cli.rb

Point at the pinned cloudsmith-cli@<version> formulae in the tap instead, which
are installable, linkable and pinnable, and link to the README for the rest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The tap tracks the CLI's version, so a formula-only fix has no version of its own
to ship under. Homebrew's revision field covers exactly this: the package becomes
1.20.2_1 while the CLI still reports 1.20.2, so brew sees an upgrade and existing
installs move onto the fixed formula.

Without it, anyone already on 1.20.2 keeps a keg built by the failed relocation,
which aborts on the first failure and so leaves the bundle partially rewritten.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The CLI release workflow's publish-homebrew job has owned this formula since
1.20.1: it renders packaging/homebrew/cloudsmith-cli.rb.tmpl, verifies the
checksums against the published downloads, and opens a bump pull request here as
cloudsmith-bot. Nothing in this repository needs running for a version bump.

CONTRIBUTING still documented scripts/bump-cloudsmith-cli.sh as the standard
release process. That helper had also stopped working when 1.20.1 replaced the
single cloudsmith.pyz asset with per-platform archives: it aborts with "Could not
find formula url line", because its regexes expect a two-space indent while the
urls now sit inside `if OS.mac?` branches. Following the documented process would
have failed, so remove it rather than repair a path the automation supersedes.

The setup instructions were also unusable: Homebrew rejects `brew install
--formula ./Formula/cloudsmith-cli.rb` outright now, since formulae must come
from a tap.

Record what actually matters instead: the formula is generated, so a change to it
has to go into the upstream template or the next release drops it, and the pinned
formulae and workflows are what is maintained here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 31, 2026 14:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

  • Ships a formula-only fix to existing installs by adding a Homebrew revision, and updates contributor/release documentation to reflect the current “generated formula” release flow and supported rollback paths.

Changes:

  • Add revision 1 to Formula/cloudsmith-cli.rb so Homebrew treats the unchanged CLI version as an upgrade and reinstalls the fixed formula.
  • Remove the now-broken/obsolete scripts/bump-cloudsmith-cli.sh helper and update CONTRIBUTING.md to document the upstream publish-homebrew template-driven process.
  • Update release notes generation to describe rollback via pinned cloudsmith-cli@<version> formulae instead of brew install --formula ./....

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
scripts/bump-cloudsmith-cli.sh Removes an outdated bump helper script that no longer matches the generated-formula workflow.
Formula/cloudsmith-cli.rb Adds a Homebrew revision to push a formula-only fix to existing installs.
CONTRIBUTING.md Re-documents the real release flow (upstream template) and correct local testing guidance inside a tap checkout.
.github/workflows/release.yml Updates autogenerated release notes rollback instructions to avoid unsupported brew install --formula ./... usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
@cloudsmith-iduffy
cloudsmith-iduffy merged commit bb38dd7 into main Jul 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants