My own Homebrew tap featuring formulas for:
As one command brew install erikw/tap/<formula>
, or brew tap erikw/tap
followed by brew install <formula>
.
Here are all formulas provided by this tap:
$ brew install erikw/tap/xdg-urlview
$ brew install erikw/tap/restic-automatic-backup-scheduler
brew help
, man brew
or check Homebrew's documentation.
- https://docs.brew.sh/Formula-Cookbook
- How to upload bottles - https://brew.sh/2020/11/18/homebrew-tap-with-bottles-uploaded-to-github-releases/
- Clone this git repo with the ssh protocol instead of https, by tapping. You should really clone the repo with brew-tap, as otherwise commands like brew-audit won't work.
$ brew tap erikw/tap git@github.com:erikw/homebrew-tap.git
- At a later point, return here with:
cd "$(brew --repository erikw/homebrew-tap)"
- At a later point, return here with:
- Setup a GitHub personal access token
- Create new token: https://github.com/settings/tokens/new?scopes=gist,repo,workflow&description=Homebrew
- Add it to
.env
:echo 'HOMEBREW_GITHUB_API_TOKEN=your_token_here' >> .env
- Make sure to have https://direnv.net/ installed in your shell so it will be loaded.
- To create a new Formula:
$ brew --tap erikw/homebrew-tap <url-to-source-files.tar.gz>
- Build from source:
$ brew install --verbose --debug --build-from-source restic-automatic-backup-scheduler $ brew reinstall --build-from-source restic-automatic-backup-scheduler
- Test a formula for erros:
$ brew audit --new-formula restic-automatic-backup-scheduler $ brew audit --strict --online restic-automatic-backup-scheduler
- Run tests only:
$ brew test restic-automatic-backup-scheduler
- Update a version & build new bottles bottles:
- Create a PR in the GitHub repo
- Only one file changed per PR:
Autosquash can't split commits that modify multiple files.
- For easy version upgrades:
$ brew bump-formula-pr --version 7.3.0 restic-automatic-backup-scheduler $ brew bump-formula-pr --version 7.3.0 restic-automatic-backup-scheduler-check
- Only one file changed per PR:
- Wait for the PR builds test.yml to become green
- Apply the PR label
pr-pull
. This will trigger the second flow from publish.yml will run and create the bottle.
- Create a PR in the GitHub repo