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
2016-04-07 16:27:34 +00:00
desc "Dependency tool for go"
2015-11-14 10:18:27 +00:00
homepage "https://godoc.org/github.com/tools/godep"
url "https://github.com/tools/godep/archive/v61.tar.gz"
sha256 "31e7257b2d07f8fbd622cadb43f13e6577dba424261f17c1de82e87916d7b4a6"
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-04-07 15:28:55 +00:00
sha256 "13a6f3482e2cacd7a1629ef5916f48a632ac00152ea01eb280a89c43ffbe7af0" => :el_capitan
sha256 "c084bb3eaeec2725411f205110544a7fe4969cfa0ac1bdca56bb1ae073f44666" => :yosemite
sha256 "980076d03de824833c8614b58ad3d8187046883a4b189195478745ebf5d6254d" => :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