Simplified procedure extracted from the contribution guidelines and the guide.
Example for a new go application, the install step and the dependencies will be different if you are building something else.
-
Update brew:
brew update
-
Brew create with the latest source tgz from github:
brew create https://github.com/MichaelMure/git-bug/archive/0.7.1.tar.gz
-
Edit the formula, you'll need an install step that build the sources and installs them and a test step that verifies that the build binary is in the right palce or that it works correctly.
class GitBug < Formula
desc "Distributed, offline-first bug tracker embedded in git, with bridges"
homepage "https://github.com/MichaelMure/git-bug"
url "https://github.com/MichaelMure/git-bug/archive/0.7.1.tar.gz"
sha256 "78a6c7dee159cdad4ad69066d6d8fc4b7c259d5ea6351aaf6709b6ac03ff3d2f"
depends_on "go" => :build
def install
system "make", "build"
bin.install "git-bug"
end
test do
assert_includes shell_output("#{bin}/git-bug --version"),"git-bug version"
end
end
Yout new formula will be at the usual place, under /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/
.
-
Audit the formula for errors:
brew audit --new git-bug brew audit --strict git-bug
-
Install your local formula:
HOMEBREW_NO_INSTALL_FROM_API=1 brew install -v git-bug
-
If you want to open a PR to Homebrew, create a commit with the new formula with the title " (new formula)" (either cloning the homebrew repo or from github) and open a PR.
Instead of pushing the new formula on
Create a new GitHub repository "homebrew-<name>
and add your formulas to the root.
Install the tap and then install one of your formulas:
brew tap uraimo/<name>
brew install uraimo/<name>/yourformula