brew create https://github.com/bazelbuild/bazel/archive/0.2.0.tar.gz --no-fetch
This will create formula file in /usr/local/Library/Formula/<formula_name>.rb
class Bazel020 < Formula
desc "Build software of any size, quickly and reliably, just as engineers do at Google."
homepage "http://bazel.io"
url "https://github.com/bazelbuild/bazel/archive/0.2.0.tar.gz"
version "0.2.0"
sha256 "3685ce039e44224260a7ed5b80dd951155998a6e128b2bebe984ea1d85a674b3"
depends_on :java => "1.8+"
depends_on :macos => :yosemite
def install
system "./compile.sh"
bin.install Dir["output/*"] # copies output files from 'output' to brew binary directory
end
test do
system "bazel", "version"
end
end
To install new formula: brew install bazel-0.2.0
To test formula: brew test bazel-0.2.0