2014-09-30 21:33:18 +00:00
|
|
|
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-12-30 17:53:01 +00:00
|
|
|
url "https://github.com/Masterminds/glide/archive/0.8.3.tar.gz"
|
|
|
|
sha256 "ec8f7c97f84733bc051d18c10fe6e0e12b2e08cd25400e75702c061be01870c0"
|
2014-09-30 21:33:18 +00:00
|
|
|
|
2014-09-30 22:04:46 +00:00
|
|
|
bottle do
|
2015-09-22 05:18:31 +00:00
|
|
|
cellar :any_skip_relocation
|
2015-12-30 18:38:02 +00:00
|
|
|
sha256 "775bef47edb206a2f466dee107d1165b0ae7cef7ffd376330d8e136dcdd2d8df" => :el_capitan
|
|
|
|
sha256 "95e3c0b8d4ab42330ef837a1af2118ce5c527d832c3bf1fdb394669347074e11" => :yosemite
|
|
|
|
sha256 "b96f9e195121df3ddfeb8f9ee31dbb9570435671dc1e8408002c48eb732e68f4" => :mavericks
|
2014-09-30 22:04:46 +00:00
|
|
|
end
|
|
|
|
|
2014-09-30 21:33:18 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
2015-11-02 15:26:49 +00:00
|
|
|
go_resource "gopkg.in/yaml.v2" do
|
|
|
|
url "https://gopkg.in/yaml.v2.git",
|
2015-12-11 02:32:44 +00:00
|
|
|
:revision => "f7716cbe52baa25d2e9b0d0da546fcf909fc16b4"
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/Masterminds/cookoo" do
|
|
|
|
url "https://github.com/Masterminds/cookoo.git",
|
2015-11-10 16:34:59 +00:00
|
|
|
:revision => "78aa11ce75e257c51be7ea945edb84cf19c4a6de"
|
2015-08-19 20:44:04 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/Masterminds/vcs" do
|
|
|
|
url "https://github.com/Masterminds/vcs.git",
|
2015-11-10 16:34:59 +00:00
|
|
|
:revision => "eaee272c8fa4514e1572e182faecff5be20e792a"
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/codegangsta/cli" do
|
|
|
|
url "https://github.com/codegangsta/cli.git",
|
2015-12-21 15:33:40 +00:00
|
|
|
:revision => "b5232bb2934f606f9f27a1305f1eea224e8e8b88"
|
2015-11-02 15:26:49 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/Masterminds/semver" do
|
|
|
|
url "https://github.com/Masterminds/semver.git",
|
|
|
|
:revision => "6333b7bd29aad1d79898ff568fd90a8aa533ae82"
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2015-12-11 02:32:44 +00:00
|
|
|
(buildpath + "src/github.com/Masterminds/glide").install "glide.go", "cfg", "cmd", "dependency", "gb", "msg", "util"
|
2014-09-30 21:33:18 +00:00
|
|
|
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
2015-12-11 02:32:44 +00:00
|
|
|
system "go", "build", "-o", "glide", "-ldflags", "-X main.version #{version}", "#{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-12-11 02:32:44 +00:00
|
|
|
assert_match /#{version}/, version
|
2014-09-30 21:33:18 +00:00
|
|
|
end
|
|
|
|
end
|