2015-09-09 09:02:20 +00:00
|
|
|
require "language/go"
|
|
|
|
|
2014-12-11 15:46:45 +00:00
|
|
|
class Deis < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Deploy and manage applications on your own servers"
|
2014-12-11 15:46:45 +00:00
|
|
|
homepage "http://deis.io"
|
2016-01-19 09:21:23 +00:00
|
|
|
url "https://github.com/deis/deis/archive/v1.12.2.tar.gz"
|
|
|
|
sha256 "48aa8f81697b213bd25e95bc2065f7c0dc75e824d7420e71856e102cc16a5229"
|
2014-12-11 15:46:45 +00:00
|
|
|
|
2014-12-12 03:48:32 +00:00
|
|
|
bottle do
|
2015-09-14 19:49:39 +00:00
|
|
|
cellar :any_skip_relocation
|
2016-01-19 10:08:47 +00:00
|
|
|
sha256 "cc0e58c2a9c9ccc78682da73ea641a493ab8d3914ca42c1d0a021f23dbebdf16" => :el_capitan
|
|
|
|
sha256 "a8c047c7d0713c13707073ccc0907ada267690ca306b6b3626e61274b53028c7" => :yosemite
|
|
|
|
sha256 "ea98f93bf5baece7c84767d7150044a41606a590bd881810418376456e11a765" => :mavericks
|
2014-12-12 03:48:32 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
depends_on "go" => :build
|
2015-11-14 10:24:21 +00:00
|
|
|
depends_on "godep" => :build
|
2014-12-11 15:46:45 +00:00
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
go_resource "github.com/docopt/docopt-go" do
|
2016-01-19 09:21:23 +00:00
|
|
|
url "https://github.com/docopt/docopt-go.git",
|
|
|
|
:revision => "854c423c810880e30b9fecdabb12d54f4a92f9bb"
|
2014-12-11 15:46:45 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
go_resource "golang.org/x/crypto" do
|
2016-01-19 09:21:23 +00:00
|
|
|
url "https://go.googlesource.com/crypto.git",
|
|
|
|
:revision => "f7445b17d61953e333441674c2d11e91ae4559d3"
|
2014-12-11 15:46:45 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
go_resource "gopkg.in/yaml.v2" do
|
2016-01-19 09:21:23 +00:00
|
|
|
url "https://github.com/go-yaml/yaml.git",
|
|
|
|
:revision => "eca94c41d994ae2215d455ce578ae6e2dc6ee516"
|
2014-12-11 15:46:45 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
mkdir_p "#{buildpath}/client/Godeps/_workspace/src/github.com/deis"
|
|
|
|
ln_s buildpath, "#{buildpath}/client/Godeps/_workspace/src/github.com/deis/deis"
|
2015-04-17 12:24:05 +00:00
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
2014-12-11 15:46:45 +00:00
|
|
|
|
|
|
|
cd "client" do
|
2015-09-09 09:02:20 +00:00
|
|
|
system "godep", "go", "build", "-a", "-ldflags", "-s", "-o", "dist/deis"
|
|
|
|
bin.install "dist/deis"
|
2014-12-11 15:46:45 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/deis", "logout"
|
|
|
|
end
|
|
|
|
end
|