2014-09-30 21:33:18 +00:00
|
|
|
require "formula"
|
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Glide < Formula
|
|
|
|
homepage "https://github.com/Masterminds/glide"
|
2014-10-06 00:16:38 +00:00
|
|
|
url "https://github.com/Masterminds/glide/archive/0.2.0.tar.gz"
|
|
|
|
sha1 "a01fc0a56cfcb9070af2e8bbca35da81310b0b21"
|
2014-09-30 21:33:18 +00:00
|
|
|
|
2014-09-30 22:04:46 +00:00
|
|
|
bottle do
|
2014-10-06 00:24:57 +00:00
|
|
|
sha1 "dea3d205ecbfa38f7cfe5e2b79c5ab12af462df9" => :mavericks
|
|
|
|
sha1 "d622cfb237b2e26a63a923f00c7d0af639974219" => :mountain_lion
|
|
|
|
sha1 "7afcc2e6b089b38d8ed38979621fceb457df0cfa" => :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",
|
|
|
|
:revision => "0ddb27ce74ade2ca988ec85587d636e10312dfc6"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/Masterminds/cookoo" do
|
|
|
|
url "https://github.com/Masterminds/cookoo.git",
|
2014-10-06 00:16:38 +00:00
|
|
|
:revision => "b85ae3d2668c9a4e99419bd98ea9803926a1e306"
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/codegangsta/cli" do
|
|
|
|
url "https://github.com/codegangsta/cli.git",
|
|
|
|
:revision => "f7ebb761e83e21225d1d8954fde853bf8edd46c4"
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
(buildpath + "src/github.com/Masterminds/glide").install "glide.go", "cmd"
|
|
|
|
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
2014-10-06 00:16:38 +00:00
|
|
|
system "go", "build", "-o", "glide", "-ldflags", "-X main.version 0.2.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")
|
|
|
|
assert_match /0.2.0/, version
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
end
|