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"
|
2015-10-16 17:22:22 +00:00
|
|
|
url "https://github.com/deis/deis/archive/v1.11.1.tar.gz"
|
|
|
|
sha256 "0d5434dbcfcbeaf07e071898ee1d2592cde21422c551a6c87e169474123f6d74"
|
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
|
2015-10-17 09:47:22 +00:00
|
|
|
sha256 "e024e5d2cfed1fcf6a04547ba4a149c943bc81868097185374c7ae5c4f41bea3" => :el_capitan
|
|
|
|
sha256 "779e8f88ea17de931f58014e96628c719bc0ff34a60532c7d8b19ede684e253f" => :yosemite
|
|
|
|
sha256 "a286d2d1a76f6e9ae0f046b824dd4d4117f39d5833168404ab03be429c0dcd63" => :mavericks
|
2014-12-12 03:48:32 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
depends_on "go" => :build
|
2014-12-11 15:46:45 +00:00
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
go_resource "github.com/tools/godep" do
|
|
|
|
url "https://github.com/tools/godep.git", :revision => "dd8d14d5985f95e87948edfe1038f0b752bacbef"
|
2014-12-11 15:46:45 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
go_resource "github.com/docopt/docopt-go" do
|
|
|
|
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
|
|
|
|
url "https://go.googlesource.com/crypto.git", :revision => "aedad9a179ec1ea11b7064c57cbc6dc30d7724ec"
|
2014-12-11 15:46:45 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
go_resource "gopkg.in/yaml.v2" do
|
|
|
|
url "https://github.com/go-yaml/yaml.git", :revision => "7ad95dd0798a40da1ccdff6dff35fd177b5edf40"
|
2014-12-11 15:46:45 +00:00
|
|
|
end
|
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
ENV.prepend_create_path "PATH", buildpath/"bin"
|
2014-12-11 15:46:45 +00:00
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
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
|
|
|
|
2015-09-09 09:02:20 +00:00
|
|
|
cd "src/github.com/tools/godep" do
|
|
|
|
system "go", "install"
|
2014-12-11 15:46:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
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
|