2014-09-30 21:33:18 +00:00
|
|
|
require "formula"
|
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Glide < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Simplified Go project management, dependency management, and vendoring"
|
2014-09-30 21:33:18 +00:00
|
|
|
homepage "https://github.com/Masterminds/glide"
|
2015-07-07 16:31:21 +00:00
|
|
|
url "https://github.com/Masterminds/glide/archive/0.4.0.tar.gz"
|
|
|
|
sha256 "59864298cb458b443af3bbaeab9ad8371dbcfd0152cdd444f666062833b83292"
|
2014-09-30 21:33:18 +00:00
|
|
|
|
2014-09-30 22:04:46 +00:00
|
|
|
bottle do
|
2015-06-17 23:53:15 +00:00
|
|
|
cellar :any
|
2015-07-07 18:09:55 +00:00
|
|
|
sha256 "5371ffac49c2a2214aed86a2d221662ff0a25ccc42d2d6054f4307fd11ae80d0" => :yosemite
|
|
|
|
sha256 "17119f94d330b63b2909aa1c944c835babcb5c9af1fc9e065c0236d2d55e9c58" => :mavericks
|
|
|
|
sha256 "009e82b7425cba2c365533600621934ce9209e827f763cb2d51ad9cebc662e89" => :mountain_lion
|
2014-09-30 22:04:46 +00:00
|
|
|
end
|
|
|
|
|
2014-09-30 21:33:18 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
go_resource "github.com/kylelemons/go-gypsy" do
|
|
|
|
url "https://github.com/kylelemons/go-gypsy.git",
|
2015-06-17 15:33:12 +00:00
|
|
|
:revision => "42fc2c7ee9b8bd0ff636cd2d7a8c0a49491044c5"
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/Masterminds/cookoo" do
|
|
|
|
url "https://github.com/Masterminds/cookoo.git",
|
2015-06-17 15:33:12 +00:00
|
|
|
:revision => "623f8762b2474f1ad6c2cac6bf331b8871591379"
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/codegangsta/cli" do
|
|
|
|
url "https://github.com/codegangsta/cli.git",
|
2015-07-07 16:31:21 +00:00
|
|
|
:revision => "ad480243a8a6cda30acf7cd999ea3e5142154fde"
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
(buildpath + "src/github.com/Masterminds/glide").install "glide.go", "cmd"
|
|
|
|
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
2015-07-07 16:31:21 +00:00
|
|
|
system "go", "build", "-o", "glide", "-ldflags", "-X main.version 0.4.0", "#{buildpath}/src/github.com/Masterminds/glide/glide.go"
|
2014-09-30 21:33:18 +00:00
|
|
|
bin.install "glide"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2014-10-06 00:16:38 +00:00
|
|
|
version = pipe_output("#{bin}/glide --version")
|
2015-07-07 16:31:21 +00:00
|
|
|
assert_match /0.4.0/, version
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
end
|