Permalink
Browse files

exercism 2.3.0

use upstream vendor directory
fix head url

Closes #3789.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information...
ilovezfs committed Aug 11, 2016
1 parent 44fa135 commit 1be5e6607446906affd84fd4adc4b6b25eb2d38f
Showing with 8 additions and 39 deletions.
  1. +8 −39 Formula/exercism.rb
View
@@ -1,11 +1,9 @@
require "language/go"
class Exercism < Formula
desc "command-line tool to interact with exercism.io"
homepage "http://cli.exercism.io"
url "https://github.com/exercism/cli/archive/v2.2.6.tar.gz"
sha256 "92a33052c497d03ace85f4c62f64e59c6a08f8ecd0cc03401f490412781d1116"
head "https://github.com/exercism.git"
url "https://github.com/exercism/cli/archive/v2.3.0.tar.gz"
sha256 "ca1432af80f9257c4c06107d0d1732845d49ac450f56ea04bcf58ead46d0af74"
head "https://github.com/exercism/cli.git"
bottle do
cellar :any_skip_relocation
@@ -16,45 +14,16 @@ class Exercism < Formula
depends_on "go" => :build
go_resource "github.com/codegangsta/cli" do
url "https://github.com/codegangsta/cli.git",
:revision => "bca61c476e3c752594983e4c9bcd5f62fb09f157"
end
go_resource "github.com/kardianos/osext" do
url "https://github.com/kardianos/osext.git",
:revision => "6e7f843663477789fac7c02def0d0909e969b4e5"
end
go_resource "golang.org/x/net" do
url "https://github.com/golang/net.git",
:revision => "d9558e5c97f85372afee28cf2b6059d7d3818919"
end
go_resource "golang.org/x/text" do
url "https://github.com/golang/text.git",
:revision => "3eb7007b740b66a77f3c85f2660a0240b284115a"
end
def install
ENV["GOBIN"] = bin
ENV["GOPATH"] = buildpath
ENV["GOHOME"] = buildpath
path = buildpath/"src/github.com/exercism/cli"
path.install Dir["*"]
Language::Go.stage_deps resources, buildpath/"src"
cd path do
system "go", "build", "./exercism/main.go"
(buildpath/"src/github.com/exercism/cli").install buildpath.children
cd "src/github.com/exercism/cli" do
system "go", "build", "-o", bin/"exercism", "exercism/main.go"
prefix.install_metafiles
end
bin.install path/"main" => "exercism"
end
test do
assert_equal "exercism version #{version}",
shell_output("#{bin}/exercism --version").strip
assert_match version.to_s, shell_output("#{bin}/exercism --version")
end
end

0 comments on commit 1be5e66

Please sign in to comment.