Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cig: use godep to load dependencies #37613

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 4 additions & 18 deletions Formula/cig.rb
@@ -1,5 +1,3 @@
require "language/go"

class Cig < Formula
desc "CLI app for checking the state of your git repositories"
homepage "https://github.com/stevenjack/cig"
Expand All @@ -21,24 +19,12 @@ class Cig < Formula
depends_on "go" => :build
depends_on "godep" => :build

go_resource "github.com/kr/fs" do
url "https://github.com/kr/fs.git",
:revision => "2788f0dbd16903de03cb8186e5c7d97b69ad387b"
end

go_resource "golang.org/x/tools" do
url "https://github.com/golang/tools.git",
:revision => "473fd854f8276c0b22f17fb458aa8f1a0e2cf5f5"
end

def install
ENV["GOPATH"] = buildpath
mkdir_p buildpath/"src/github.com/stevenjack/"
ln_sf buildpath, buildpath/"src/github.com/stevenjack/cig"
Language::Go.stage_deps resources, buildpath/"src"

system "godep", "go", "build", "-o", "cig", "."
bin.install "cig"
(buildpath/"src/github.com/stevenjack").mkpath
ln_s buildpath, "src/github.com/stevenjack/cig"
system "godep", "restore"
system "go", "build", "-o", bin/"cig"
end

test do
Expand Down