fix(brew): generate canonical Formula/ocm.rb alongside versioned pin#1997
Merged
fabianburth merged 3 commits intoJun 10, 2026
Merged
Conversation
The release pipeline previously only generated Formula/ocm@<version>.rb
and pointed Aliases/ocm at the latest versioned file. Because brew aliases
shadow same-named formula files and resolve to the target, brew install
of the canonical name installed a versioned formula. Homebrew treats
versioned formulas as separate packages, so each release accumulated a
new keg side-by-side instead of upgrading in place.
Generate both files on every release:
- Formula/ocm.rb (class Ocm) — canonical, overwritten each release;
`brew install ocm` upgrades in place.
- Formula/ocm@<version>.rb (class OcmAT<digits>) — opt-in pin; users
who want a specific version run `brew install ocm@X.Y.Z`.
Drop the Aliases/ocm symlink creation in the workflow and remove any
stale symlink left over from earlier runs, so brew install resolves to
the canonical formula instead of the alias.
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Merged
3 tasks
2 tasks
The Aliases/ocm symlink is removed in the tap repo, so the workflow doesn't need to clean it up on every release. Drop both the rm step and the Aliases/* add-paths entry. Signed-off-by: Fabian Burth <fabian.burth@sap.com>
jakobmoellerdev
approved these changes
Jun 10, 2026
fabianburth
added a commit
to open-component-model/open-component-model
that referenced
this pull request
Jun 10, 2026
## Summary Add a callout to the legacy install docs explaining the one-time migration step for users who installed the OCM CLI via Homebrew before the tap was fixed. Background: earlier tap releases installed the CLI as a version-pinned formula (e.g. \`ocm@0.43.0\`), so brew treated each release as a separate package and accumulated side-by-side kegs instead of upgrading in place. The tap is now fixed to use the canonical \`Formula/ocm.rb\` (open-component-model/homebrew-tap#47, with the release pipeline change in open-component-model/ocm#1997), but existing users stay stuck on their pinned version until they manually uninstall it and reinstall the canonical formula. ## Test plan - [x] Render the legacy install docs and verify the callout displays correctly. - [x] Reviewer sanity-checks the wording. --------- Signed-off-by: Fabian Burth <fabian.burth@sap.com>
fabianburth
added a commit
to open-component-model/homebrew-tap
that referenced
this pull request
Jun 10, 2026
## Summary `brew install` of this tap currently installs each release as a side-by-side keg instead of upgrading in place, so users pile up `ocm@0.18.0`, `ocm@0.40.0`, …, `ocm@0.43.0` over time. Two issues, two commits: - **`Formula/ocm.rb` was stale at v0.18.0.** The release pipeline only ever updated the versioned `ocm@<version>.rb` files. Bump it to v0.43.0 to match the latest release. - **`Aliases/ocm` shadowed `Formula/ocm.rb` and pointed at the latest versioned formula.** Brew aliases take precedence over same-named formula files, so `brew install …/ocm` resolved to `ocm@0.43.0` (a versioned formula). Homebrew treats versioned formulas as separate packages, hence the pile-up. Remove the alias so the canonical `Formula/ocm.rb` is what resolves. The companion change in `open-component-model/ocm` updates the release pipeline to keep `Formula/ocm.rb` in sync going forward and stop creating the alias: open-component-model/ocm#1997 ## Migration Existing users on the alias path stay on `ocm@0.43.0` because brew sees that formula still exists in the tap and there's no `ocm` keg to upgrade. One-time migration: ```sh brew uninstall ocm@0.43.0 brew install open-component-model/tap/ocm ``` **WE NEED TO FLAG THIS IN THE RELEASE NOTES AND ON THE WEBSITE!** **Also, this is a pre-requisite for the updated release flow to work. So it needs to be merged before the next ocm release.** ## Test plan - [x] Locally tapped this branch via symlink. `brew info …/ocm` resolves to canonical `name: "ocm"`, `aliases: []`, stable 0.43.0. - [x] `brew info …/ocm@0.43.0` still resolves to the versioned formula (opt-in pin still works). - [x] Reviewer sanity-checks the diff. --------- Signed-off-by: Fabian Burth <fabian.burth@sap.com>
ocmbot Bot
pushed a commit
to open-component-model/open-component-model
that referenced
this pull request
Jun 10, 2026
## Summary Add a callout to the legacy install docs explaining the one-time migration step for users who installed the OCM CLI via Homebrew before the tap was fixed. Background: earlier tap releases installed the CLI as a version-pinned formula (e.g. \`ocm@0.43.0\`), so brew treated each release as a separate package and accumulated side-by-side kegs instead of upgrading in place. The tap is now fixed to use the canonical \`Formula/ocm.rb\` (open-component-model/homebrew-tap#47, with the release pipeline change in open-component-model/ocm#1997), but existing users stay stuck on their pinned version until they manually uninstall it and reinstall the canonical formula. ## Test plan - [x] Render the legacy install docs and verify the callout displays correctly. - [x] Reviewer sanity-checks the wording. --------- Signed-off-by: Fabian Burth <fabian.burth@sap.com> 18bfd88
matthiasbruns
pushed a commit
to knp-sap/ocm
that referenced
this pull request
Jun 15, 2026
…pen-component-model#1997) ## Summary Users who install via `brew install open-component-model/tap/ocm` accumulate a new keg per release (`ocm@0.40.0`, `ocm@0.41.0`, …) instead of upgrading in place. Root cause is in this repo's release pipeline. The publish workflow only ever generated `Formula/ocm@<version>.rb` and pointed `Aliases/ocm` at the latest one. Brew aliases shadow same-named formula files and resolve to the target, so `brew install …/ocm` installed a versioned formula. Homebrew treats versioned formulas as separate packages and installs them side-by-side, hence the pile-up. Generate **both** files on every release: - `Formula/ocm.rb` (class `Ocm`) — canonical, overwritten each release; `brew install ocm` upgrades in place. - `Formula/ocm@<version>.rb` (class `OcmAT<digits>`) — opt-in pin; users who want a specific version run `brew install ocm@X.Y.Z`. Drop the `Aliases/ocm` symlink creation in the workflow and remove any stale symlink left over from earlier runs. Companion cleanup in the tap (bumps `Formula/ocm.rb` to v0.43.0 manually so users aren't stuck on v0.18.0 until the next release, and removes the existing `Aliases/ocm`): open-component-model/homebrew-tap#47 ## Test plan - [x] `go test ./...` in `hack/brew` passes - [x] Generator output for v0.43.0 byte-identical to the existing tap files (both `Formula/ocm.rb` and `Formula/ocm@0.43.0.rb`) - [x] Locally tapped a synthetic tap with both generated files: `brew info …/ocm` resolves to canonical formula 0.43.0; `brew info …/ocm@0.43.0` still resolves to the versioned formula - [x] Reviewer sanity-checks the workflow diff --------- Signed-off-by: Fabian Burth <fabian.burth@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
sk31337
pushed a commit
to sk31337/open-component-model
that referenced
this pull request
Jun 19, 2026
…n-component-model#2802) ## Summary Add a callout to the legacy install docs explaining the one-time migration step for users who installed the OCM CLI via Homebrew before the tap was fixed. Background: earlier tap releases installed the CLI as a version-pinned formula (e.g. \`ocm@0.43.0\`), so brew treated each release as a separate package and accumulated side-by-side kegs instead of upgrading in place. The tap is now fixed to use the canonical \`Formula/ocm.rb\` (open-component-model/homebrew-tap#47, with the release pipeline change in open-component-model/ocm#1997), but existing users stay stuck on their pinned version until they manually uninstall it and reinstall the canonical formula. ## Test plan - [x] Render the legacy install docs and verify the callout displays correctly. - [x] Reviewer sanity-checks the wording. --------- Signed-off-by: Fabian Burth <fabian.burth@sap.com> Signed-off-by: sk31337 <sk31337@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Users who install via
brew install open-component-model/tap/ocmaccumulate a new keg per release (ocm@0.40.0,ocm@0.41.0, …) instead of upgrading in place. Root cause is in this repo's release pipeline.The publish workflow only ever generated
Formula/ocm@<version>.rband pointedAliases/ocmat the latest one. Brew aliases shadow same-named formula files and resolve to the target, sobrew install …/ocminstalled a versioned formula. Homebrew treats versioned formulas as separate packages and installs them side-by-side, hence the pile-up.Generate both files on every release:
Formula/ocm.rb(classOcm) — canonical, overwritten each release;brew install ocmupgrades in place.Formula/ocm@<version>.rb(classOcmAT<digits>) — opt-in pin; users who want a specific version runbrew install ocm@X.Y.Z.Drop the
Aliases/ocmsymlink creation in the workflow and remove any stale symlink left over from earlier runs.Companion cleanup in the tap (bumps
Formula/ocm.rbto v0.43.0 manually so users aren't stuck on v0.18.0 until the next release, and removes the existingAliases/ocm): open-component-model/homebrew-tap#47Test plan
go test ./...inhack/brewpassesFormula/ocm.rbandFormula/ocm@0.43.0.rb)brew info …/ocmresolves to canonical formula 0.43.0;brew info …/ocm@0.43.0still resolves to the versioned formula