57 lines
1.9 KiB
Ruby
57 lines
1.9 KiB
Ruby
require "language/go"
|
|
|
|
class Glide < Formula
|
|
desc "Simplified Go project management, dependency management, and vendoring"
|
|
homepage "https://github.com/Masterminds/glide"
|
|
url "https://github.com/Masterminds/glide/archive/0.8.0.tar.gz"
|
|
sha256 "110d24bbc8d04c09d7deeb22a28e62aeafc2439f54c069b7d65f2db81a573454"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "424caace622ed756de7506eacce01d43b0f1f5487831efa632a9392176b06517" => :el_capitan
|
|
sha256 "7ea161a78b429b1116386f5e103cc44fe09830df6f8071ca68db25c0e27a7aa1" => :yosemite
|
|
sha256 "1816e7fe708d76b45aa3d5fc5c1212d16bb3b9dd931a8ac177685c2e7660b2ad" => :mavericks
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
|
|
go_resource "gopkg.in/yaml.v2" do
|
|
url "https://gopkg.in/yaml.v2.git",
|
|
:revision => "f7716cbe52baa25d2e9b0d0da546fcf909fc16b4"
|
|
end
|
|
|
|
go_resource "github.com/Masterminds/cookoo" do
|
|
url "https://github.com/Masterminds/cookoo.git",
|
|
:revision => "78aa11ce75e257c51be7ea945edb84cf19c4a6de"
|
|
end
|
|
|
|
go_resource "github.com/Masterminds/vcs" do
|
|
url "https://github.com/Masterminds/vcs.git",
|
|
:revision => "eaee272c8fa4514e1572e182faecff5be20e792a"
|
|
end
|
|
|
|
go_resource "github.com/codegangsta/cli" do
|
|
url "https://github.com/codegangsta/cli.git",
|
|
:revision => "0302d3914d2a6ad61404584cdae6e6dbc9c03599"
|
|
end
|
|
|
|
go_resource "github.com/Masterminds/semver" do
|
|
url "https://github.com/Masterminds/semver.git",
|
|
:revision => "6333b7bd29aad1d79898ff568fd90a8aa533ae82"
|
|
end
|
|
|
|
def install
|
|
(buildpath + "src/github.com/Masterminds/glide").install "glide.go", "cfg", "cmd", "dependency", "gb", "msg", "util"
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
system "go", "build", "-o", "glide", "-ldflags", "-X main.version #{version}", "#{buildpath}/src/github.com/Masterminds/glide/glide.go"
|
|
bin.install "glide"
|
|
end
|
|
|
|
test do
|
|
version = pipe_output("#{bin}/glide --version")
|
|
assert_match /#{version}/, version
|
|
end
|
|
end
|