Skip to content

Make Homebrew versioned formula generation dynamic#7310

Open
alfonso-noriega wants to merge 2 commits intomainfrom
homebrew-versioned-formulas
Open

Make Homebrew versioned formula generation dynamic#7310
alfonso-noriega wants to merge 2 commits intomainfrom
homebrew-versioned-formulas

Conversation

@alfonso-noriega
Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

How to test your changes?

Post-release steps

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

Copy link
Copy Markdown
Contributor Author

alfonso-noriega commented Apr 15, 2026

@alfonso-noriega alfonso-noriega marked this pull request as ready for review April 15, 2026 15:43
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner April 15, 2026 15:43
Comment thread bin/create-homebrew-pr.js

async function renderVersionedFormula(majorVersion, variables) {
const engine = new Liquid({root: packagingDirectory})
const templatePath = path.join(packagingDirectory, "stable/src/shopify-cli.rb.liquid")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see that liquid file still has references to version 3
like

if formulaVersion != '3

Do we need to update that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated already in the original PR. My question here would be whether we really want to this and keep generating formulas for previous versions or not.

Instead of a hardcoded majorVersion === 3 guard, generate the current
major's versioned formula (e.g. shopify-cli@3.rb, shopify-cli@4.rb)
dynamically on every stable release using the shared template.

When we ship a new major, the previous major's formula in homebrew-shopify
naturally freezes at its last release since we stop updating it — no manual
intervention needed.
@alfonso-noriega alfonso-noriega force-pushed the prepare-semver-support branch from 51b313f to c24f37c Compare April 16, 2026 15:01
@alfonso-noriega alfonso-noriega force-pushed the homebrew-versioned-formulas branch from a573648 to 2ac3237 Compare April 16, 2026 15:01
Base automatically changed from prepare-semver-support to main April 17, 2026 08:07
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.

2 participants