craft icon indicating copy to clipboard operation
craft copied to clipboard

Prevent releasing beta versions and newer major overrides for Brew releases

Open kamilogorek opened this issue 3 years ago • 2 comments

  1. Our Brew releasing workflow doesn't understand to not publish itself when a newer major is present, and it overrides it, which makes patches for older versions override the latest version.
  2. Brew doesn't understand pre-releases, and it tries to install 2.0.0-beta.0 which is not available at the time of doing Crafts pre-prelease publish.

beta ref: https://github.com/getsentry/homebrew-tools/pull/3 major ref: https://github.com/getsentry/homebrew-tools/pull/5

kamilogorek avatar May 08 '22 07:05 kamilogorek

Adding: It seems like our brew target publishes pre-release versions, like alphas, as latest. Which is no bueno.

lforst avatar Nov 27 '23 14:11 lforst

Regarding (1), Brew doesn't have a concept of release channels like you can use with gem install --version or pip install example-package>=2.0.1 that we could use to have parallel latest releases in multiple support series like 1.x.x and 2.x.x. The way other orgs solve this is by creating entirely separate formulas, like https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/p/[email protected] vs https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/p/[email protected]. AFAIK the @s aren't a feature of homebrew, they're part of the formula name used to namespace the different implicit major support series channels.

So what we really want is a separate homebrew formula for sentry-cli@1 and sentry-cli@2 that can each have their own "latest" release.

ETA: PostgreSQL use an option keg_only :versioned_formula with the all but their postgresql@14 formula, which I think is how they are supporting a workflow where brew install postgres will select the postgres@14 fomula (because they also have later versions too, 15 and 16, that I guess aren't their "officially supported latest major" ¯\(ツ)/¯ )

armcknight avatar Jan 24 '24 20:01 armcknight