CLI app to update Homebrew formulae.
To get the most up to date binaries, check the releases for the pre-built binary for your system.
You can also
go get to install from source.
go get -u github.com/tombell/brewer/cmd/brewer
-h/--help flag to see all the available flags when running brewer.
You will need a GitHub API token when running brewer. It's advised you create a token specifically for brewer.
You can update four different parts of a formula with brewer.
- the tag as part of the URL
:tag => "..."with
- the revision as part of the URL
:revision => "..."with
- the URL
- the SHA256
The path in the repository to the formula to update is passed as the
You also have to specify the repository owner and name (the name defaults to
homebrew-formulae if omitted).
The commit message, author, and author's email must be given for the commit that updates the formula.
brewer --token $GITHUB_TOKEN \ --owner tombell \ --name homebrew-formulae \ --formula Formula/brewer.rb \ --tag v1.0.0 \ --revision beea04da6f030de641408ca265e31fb01e7dc22f \ --commit-message "Update Formula/brewer.rb to v1.0.0" \ --commit-author "Tom Bell" \ --commit-email "email@example.com"
This will pull down
Formula/brewer.rb from the repository, and update the tag
and revision lines with
With the commit message
Update Formula/brewer.rb to v1.0.0, by Tom Bell.
Fairly simple! In the future I might expand this to be able to update more formula options. Potentially even specify a template to render for the formula with the given options.