These instructions reference the durdraw tool
- Create a new repo in github. It MUST be named "homebrew-durdraw" for the
brew tap
command to work as intended - Install homebrew. It works well with linux and macos, for both x86_64 and arm64
- Create the tap locally:
brew tap-new --branch main --github-packages leviable/durdraw
a. Note the instructions it spits out at the end. Copy and save those elsewhere so you can reference them later if needed. cd
into the new directory. You can get the file path withbrew tap-info leviable/durdraw
- You may need to set your remote
git remote set-url origin [email protected]:leviable/homebrew-durdraw.git
and your master/main branch origin - Check out a new branch, strongly suggest not merging directly to master/main
- Create your new formula, using the link to the latest github release:
brew create --python https://github.com/cmang/durdraw/archive/refs/tags/0.29.0.tar.gz --tap leviable/durdraw
- Copy the
Formula/durdraw.rb
from my repo to yours. You shouldn't need to make any changes - At this point you can audit, test, and install the formula locally. It's helpful to do these locally before pushing, as CI will also do them, so its nice to know things are working before waiting on the CI cycle:
brew audit durdraw --strict
brew test durdraw
brew install durdraw
which durdraw # should be in $(brew config | grep HOMEBREW_PREFIX)/bin
durdraw -V
- Commit your changes and push
git push origin <your branch>
- Open your github repo in a browser and create a pull request. Github actions should kick off at this point.
a. If you encounter any failures, fix them locally and commit with
--amend
and force push the amended commit. as CI expects there to be one and only one commit - Finally, when you are ready to merge, create/add a
pr-pull
tag to the PR, and CI will do the rest, including closing the PR and publishing everything to github packages. Checkbrew commands
for other supported tags (pr-automerge
,pr-publish
, etc) - At this point all your users need to do is tap and install
brew tap leviable/durdraw
brew install durdraw
- When durdraw releases a new version, all you need to do for your homebrew repo is run
brew bump-formula-pr
and repeat the push/tag workflow. If you want to get even fancier you can setup triggers so that when you cut a release in thedurdraw
repo, a PR in this new homebrew repo gets automatically created.