homebrew-core/Formula/godep.rb

39 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/v29.tar.gz"
sha256 "ca896c220f2995a50a5d9e63df929fa393c3cd1de9722210b5ef3684981bed2a"
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
2015-11-22 11:31:28 +00:00
sha256 "0c9d4a7386b86fca27e1762859bdad5e90883ddc038ffd3eb82c631055381f3f" => :el_capitan
sha256 "d70a3a2b143f7440f201829562748f976119fc8517859deac109b24739cbf0bc" => :yosemite
sha256 "da476787515094caf65b3f13cfc7a3c4058e9291607243c005fce3c6946cd4fc" => :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
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