2014-12-14 03:22:48 +00:00
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Deisctl < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Deis Control Utility"
|
2014-12-14 03:22:48 +00:00
|
|
|
homepage "http://deis.io/"
|
2015-08-16 20:10:59 +00:00
|
|
|
url "https://github.com/deis/deis/archive/v1.9.0.tar.gz"
|
|
|
|
sha256 "6acca76008b1e48961eb23ddd62f8db742be053983ce34b1a516bb2d4719bf82"
|
2014-12-14 03:22:48 +00:00
|
|
|
|
2015-02-24 09:40:01 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-08-16 21:06:48 +00:00
|
|
|
sha256 "e5fe216c7f63394410837ac23e46f9fd3ddf85ebf5d39ff58265eb993f6da95c" => :yosemite
|
|
|
|
sha256 "b001eec00c2ea9fdd4d6e12113990e3e7c9addf7b22a9c506541ff0236a17d75" => :mavericks
|
|
|
|
sha256 "3c909d77ab06101b9b9c63a7b02de500545cef50f0d98757a62587b251576cde" => :mountain_lion
|
2015-02-24 09:40:01 +00:00
|
|
|
end
|
|
|
|
|
2014-12-14 03:22:48 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
2015-08-16 20:10:59 +00:00
|
|
|
go_resource "github.com/tools/godep" do
|
|
|
|
url "https://github.com/tools/godep.git", :revision => "66fa30a455532b64a7f70f8716a274c833bee3c6"
|
2014-12-14 03:22:48 +00:00
|
|
|
end
|
|
|
|
|
2015-08-16 20:10:59 +00:00
|
|
|
go_resource "github.com/docopt/docopt-go" do
|
|
|
|
url "https://github.com/docopt/docopt-go.git", :revision => "854c423c810880e30b9fecdabb12d54f4a92f9bb"
|
2014-12-14 03:22:48 +00:00
|
|
|
end
|
|
|
|
|
2015-08-16 20:10:59 +00:00
|
|
|
go_resource "github.com/coreos/go-etcd" do
|
|
|
|
url "https://github.com/coreos/go-etcd.git", :revision => "c904d7032a70da6551c43929f199244f6a45f4c1"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/coreos/fleet" do
|
|
|
|
url "https://github.com/coreos/fleet.git", :tag => "v0.9.2", :revision => "e0f7a2316dc6ae610979598c4efe127ac8ff1ae9"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/ugorji/go" do
|
|
|
|
url "https://github.com/ugorji/go.git", :revision => "821cda7e48749cacf7cad2c6ed01e96457ca7e9d"
|
2014-12-14 03:22:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
ENV["CGO_ENABLED"] = "0"
|
|
|
|
ENV.prepend_create_path "PATH", buildpath/"bin"
|
|
|
|
|
|
|
|
mkdir_p "#{buildpath}/deisctl/Godeps/_workspace/src/github.com/deis"
|
|
|
|
ln_s buildpath, "#{buildpath}/deisctl/Godeps/_workspace/src/github.com/deis/deis"
|
|
|
|
|
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
2015-08-16 20:10:59 +00:00
|
|
|
cd "src/github.com/tools/godep" do
|
2014-12-14 03:22:48 +00:00
|
|
|
system "go", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
cd "deisctl" do
|
|
|
|
system "godep", "go", "build", "-a", "-ldflags", "-s", "-o", "dist/deisctl"
|
|
|
|
bin.install "dist/deisctl"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-08-16 20:10:59 +00:00
|
|
|
system bin/"deisctl", "help"
|
2014-12-14 03:22:48 +00:00
|
|
|
end
|
|
|
|
end
|