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"
url "https://github.com/tools/godep/archive/v55.tar.gz"
sha256 "26e41a0fc04a18d67efd3433f3d3f1cdf9a6b1b75f8c8ed72d110ecb336cabcb"
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-02-24 03:20:49 +00:00
sha256 "49d622b23cc04d4a719c71256fa69f1ed4bca043a8bba9e43654d8de1d748ee6" => :el_capitan
sha256 "6d59cb9af8ae1fd4c37712882af7e237182aada345be0ab94a3b0613d9fe6d24" => :yosemite
sha256 "a6785e1bbd5991ce27dcdb4d14cff13a7c13e07b3b86c31ed7c3fbe93f3aafb8" => :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