aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gauge.rb
blob: a0a89236b51c947c2dced4088972a3187b0c3579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
require "language/go"

class Gauge < Formula
  homepage "http://getgauge.io"
  url "https://github.com/getgauge/gauge/archive/v0.0.3.tar.gz"
  sha1 "5cb64ce8d803c739c3e21513b334e0d2216cc68a"

  bottle do
    sha1 "6b503ea7ac28bd315a8a7fa55917aaccb20e9e87" => :yosemite
    sha1 "b353b1dc155055ed3b8f94f6f1ebe2e470246c97" => :mavericks
    sha1 "10eacac84c0de5491bea5368bc6d33d65d49a2f4" => :mountain_lion
  end

  depends_on "go" => :build

  go_resource "code.google.com/p/goprotobuf" do
    url "https://code.google.com/p/goprotobuf",
        :revision => "725eb0907b649c438e0e8f1601648597141fb66c",
        :using => :hg
  end

  go_resource "github.com/getgauge/common" do
    url "https://github.com/getgauge/common.git",
        :revision => "4c20d2d8fc5c4c447a6110f4f888f72c3d66f84c"
  end

  go_resource "github.com/getgauge/mflag" do
    url "https://github.com/getgauge/mflag.git",
        :revision => "d64a28a7abc05602c9e6d9c5a1488ee69f9fcb83"
  end

  go_resource "github.com/dmotylev/goproperties" do
    url "https://github.com/dmotylev/goproperties.git",
        :revision => "7cbffbaada472bc302cbaca51c1d5ed2682eb509"
  end

  go_resource "github.com/wsxiaoys/terminal" do
    url "https://github.com/wsxiaoys/terminal.git",
        :revision => "9dcaf1d63119a8ac00eef82270eaef08b6aa2328"
  end

  def install
    ENV["GOPATH"] = buildpath
    gaugePath = buildpath/"src/github.com/getgauge"
    mkdir_p gaugePath
    ln_s buildpath, gaugePath/"gauge"
    Language::Go.stage_deps resources, buildpath/"src"

    cd gaugePath/"gauge" do
      system "go", "run", "build/make.go"
      system "go", "run", "build/make.go", "--install", "--prefix", prefix
    end
  end

  test do
    system "gauge", "--init", "java"
  end
end