49 lines
1.5 KiB
Ruby
49 lines
1.5 KiB
Ruby
class Godep < Formula
|
|
desc "Dependency tool for go"
|
|
homepage "https://godoc.org/github.com/tools/godep"
|
|
url "https://github.com/tools/godep/archive/v80.tar.gz"
|
|
sha256 "029adc1a0ce5c63cd40b56660664e73456648e5c031ba6c214ba1e1e9fc86cf6"
|
|
license "BSD-3-Clause"
|
|
revision 41
|
|
head "https://github.com/tools/godep.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "bec6384d4e14e4f584507af797218faa942ef954709393797b58ab90ad527b29" => :catalina
|
|
sha256 "c078e114b01ef3a6fe85b2e0c18df1942e11c523556ad9d8656d40b4d156cc7c" => :mojave
|
|
sha256 "8a908cf18b8e8baebf359610710e4b3235bf53017959da151d9f4c7ccc2e5ae3" => :high_sierra
|
|
end
|
|
|
|
deprecate! date: "2018-01-26", because: :repo_archived
|
|
|
|
depends_on "go"
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
(buildpath/"src/github.com/tools/godep").install buildpath.children
|
|
cd "src/github.com/tools/godep" do
|
|
system "go", "build", "-o", bin/"godep"
|
|
prefix.install_metafiles
|
|
end
|
|
end
|
|
|
|
test do
|
|
ENV["GOPATH"] = testpath.realpath
|
|
(testpath/"Godeps/Godeps.json").write <<~EOS
|
|
{
|
|
"ImportPath": "github.com/tools/godep",
|
|
"GoVersion": "go1.8",
|
|
"Deps": [
|
|
{
|
|
"ImportPath": "golang.org/x/tools/cover",
|
|
"Rev": "3fe2afc9e626f32e91aff6eddb78b14743446865"
|
|
}
|
|
]
|
|
}
|
|
EOS
|
|
system bin/"godep", "restore"
|
|
assert_predicate testpath/"src/golang.org/x/tools/README", :exist?,
|
|
"Failed to find 'src/golang.org/x/tools/README!' file"
|
|
end
|
|
end
|