Skip to content

feat(ENG-14534): bump the formula from the CLI release event - #41

Merged
cloudsmith-iduffy merged 2 commits into
mainfrom
eng-14534-bump-cli-version
Oct 19, 2026
Merged

cloudsmith-iduffy merged 2 commits into
mainfrom
eng-14534-bump-cli-version

Conversation

@cloudsmith-iduffy

@cloudsmith-iduffy cloudsmith-iduffy commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR moves the formula bump into this repository. Until now, the CLI release workflow rendered a template that it kept in the CLI repository, and then copied the rendered file over Formula/cloudsmith-cli.rb. A fix made here was therefore lost at the next release unless someone also changed the template.

Now each CLI release sends a cloudsmith-cli-release event to this repository, and the new Bump Cloudsmith CLI workflow does the bump:

  1. It runs scripts/bump-cli-version.py VERSION. The script reads the sha256 values from the SHA256SUMS asset of the CLI release and checks each published download against them. It then writes the new version and sha256 values into the formula and removes any revision line. The rest of the formula is not changed.
  2. It opens the bump PR as cloudsmith-bot and squash-merges it when the checks pass, the same as before. The CLI repository's open-cli-bump-pr action does this step.

You can also run the workflow by hand with a version, or run python3 scripts/bump-cli-version.py 1.29.1 locally to see the change.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Other (please describe)

Additional Notes

  • Add two secrets to this repository before the next CLI release: DOWNSTREAM_RELEASE_PUSH_TOKEN and CLOUDSMITH_BOT_SSH_KEY, with the same values as in cloudsmith-io/cloudsmith-cli. A PR opened with the default GITHUB_TOKEN does not start the formula checks, so the bot token is necessary.
  • Depends on chore(ENG-14534): send a release event to downstream repositories cloudsmith-cli#451, which is merged. The CLI side sends the event and contains the open-cli-bump-pr action. This PR pins that action to the #451 merge commit on master.
  • Verification: I ran the script on the shipped v1.28.0 formula with version 1.29.0. It checked all four downloads on dl.cloudsmith.io, and the output is byte-identical to the v1.29.0 formula that shipped in Bump cloudsmith-cli to v1.29.0 #40. The new Test scripts workflow runs the unit tests.

🤖 Generated with Claude Code

Add the Bump Cloudsmith CLI workflow. It runs on the
cloudsmith-cli-release event that each CLI release sends, or by hand
with a version. It runs scripts/bump-cli-version.py through the
open-cli-bump-pr action of the CLI repository, which opens the pull
request from cloudsmith-bot and merges it when the checks pass.

The script reads the sha256 values from the SHA256SUMS asset of the CLI
release and verifies each published download against them. It changes
only the version, the sha256 values and the revision of the formula, so
a change to the formula in this repository now persists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

🟡 Changes recommended

Bump runs can commit generated bytecode, and no-op runs unnecessarily depend on release asset availability.

2 open issues
What changed in this PR

Moves CLI formula updates into the tap repository so release bumps preserve hand-maintained formula changes.

Changes:

  • Adds an event-driven and manually triggered bump workflow.
  • Adds checksum-verified version updates and unit tests.
  • Documents local formula ownership and the release process.
File Description
scripts/​test_bump_cli_version.py Tests version updates and download verification.
scripts/​bump-cli-version.py Updates versions and checksums while preserving formula logic.
Formula/​cloudsmith-cli.rb Updates ownership comments only.
CONTRIBUTING.md Documents the new release and maintenance process.
.github/​workflows/​scripts-test.yml Runs Python unit tests.
.github/​workflows/​bump-cli-version.yml Automates bump PR creation and merging.

Review effort: Balanced

Comment thread .github/workflows/bump-cli-version.yml Resolved
Comment thread scripts/bump-cli-version.py Resolved
- Compare the versions before the script downloads SHA256SUMS. A re-run for
  the pinned version or an older one then does not need the release assets.
- Ignore __pycache__/. The import of render-formula-version writes bytecode,
  and the bump action stages all changes with git add --all.
- Try the download again on all OSError values. A read timeout raises
  TimeoutError, which is not a URLError.
- Pin open-cli-bump-pr to the merge commit of cloudsmith-io/cloudsmith-cli#451.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudsmith-iduffy
cloudsmith-iduffy enabled auto-merge (squash) October 19, 2026 16:25
@cloudsmith-iduffy
cloudsmith-iduffy merged commit c2bc900 into main Oct 19, 2026
10 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.

2 participants