Skip to content

Instantly share code, notes, and snippets.

@cliffrowley
Last active July 8, 2020 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffrowley/0a2fd712793fffc31010c08179e5c3bd to your computer and use it in GitHub Desktop.
Save cliffrowley/0a2fd712793fffc31010c08179e5c3bd to your computer and use it in GitHub Desktop.
Homebrew formula for Habitus
class Habitus < Formula
desc "A standalone build flow tool for Docker"
homepage "http://www.habitus.io"
head "https://github.com/cloud66/habitus.git"
depends_on "go" => :build
def install
contents = Dir["{*,.git,.gitignore}"]
gopath = buildpath/"gopath"
(gopath/"src/github.com/cloud66/habitus").install contents
ENV["GOPATH"] = gopath
ENV.prepend_create_path "PATH", gopath/"bin"
cd gopath/"src/github.com/cloud66/habitus" do
system "go build"
bin.install "habitus"
end
end
test do
fork do
exec "#{bin}/habitus", "--version"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment