homebrew-core/Formula/godep.rb

40 lines
1.1 KiB
Ruby
Raw Normal View History

2015-11-14 10:18:27 +00:00
class Godep < Formula
desc "dependency tool for go"
homepage "https://godoc.org/github.com/tools/godep"
2016-03-08 23:59:38 +00:00
url "https://github.com/tools/godep/archive/v57.tar.gz"
sha256 "abc7b482690fdd76ed35c3e1a297090668dac446ebc605a75a0114203cb63e72"
2015-11-14 10:18:27 +00:00
head "https://github.com/tools/godep.git"
2015-11-14 11:12:41 +00:00
bottle do
cellar :any_skip_relocation
2016-03-09 00:48:53 +00:00
sha256 "b5836b613eb4ebc458ac64a6c92a328a515aaa9f0aa979b5dbee6b376afe5911" => :el_capitan
sha256 "432dbdfe4affc55606826df47d4fec5b0fc9963b133f3ab9a12c75efd2b9433f" => :yosemite
sha256 "b6bbee352b50dcf550a46b30318a7257b3f9b187c55b0ea25531ad4000962f77" => :mavericks
2015-11-14 11:12:41 +00:00
end
2015-11-14 11:21:30 +00:00
depends_on "go"
2015-11-14 10:18:27 +00:00
def install
ENV["GOPATH"] = buildpath
mkdir_p buildpath/"src/github.com/tools/"
ln_sf buildpath, buildpath/"src/github.com/tools/godep"
cd "src/github.com/tools/godep" do
system "go", "build", "-o", bin/"godep"
end
end
test do
ENV["GO15VENDOREXPERIMENT"] = "0"
2015-11-14 10:18:27 +00:00
mkdir "Godeps"
(testpath/"Godeps/Geodeps.json").write <<-EOS.undent
{
"ImportPath": "github.com/tools/godep",
"GoVersion": "go1.4.2",
"Deps": []
}
EOS
system bin/"godep", "path"
end
end