Publishing beta version

I’m wondering how I can publish beta versions with brew. Can you give me some hints?

The same way you’d install normal versions.

But how can I define that this is a beta and not a stable? I didn’t understand the versioning yet.

That really depends on where you want to define this. For homebrew-core only stable versions are allowed. If you have a tap you might want to do something like this: https://docs.brew.sh/Formula-Cookbook#unstable-versions-devel-head

I’m using a tap, so I could use that for “previews” like betas. I do not understand ruby so I’m not really sure what the snip it tries to tell me. I need a branch containing the same Formula right?

Does head "https://github.com/some/package.git", :revision => "090930930295adslfknsdfsdaffnasd13" mean that I specify a special commit hash for a version called “head”?

Do I understand it correctly that I could define a “1.1-rc1” like this?

class Foo < Formula
  head "https://github.com/some/package.git", :branch => "1.1-rc-1"

and it could be installed with

brew user/homebrew-repo/Foo --head

Right?

Does head "https://github.com/some/package.git", :revision => "090930930295adslfknsdfsdaffnasd13" mean that I specify a special commit hash for a version called “head”?

Yes

Do I understand it correctly that I could define a “1.1-rc1” like this?

Yes, that looks correct

brew install user/homebrew-repo/Foo --head

Yeah, though a homebrew-repo repository on github can be tapped as as user/repo after which formula can be installed using brew install Foo --HEAD unless they conflict with another formula. In which it will be brew install user/repo/Foo --HEAD

1 Like