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-11-14 11:12:40 +00:00
|
|
|
revision 1
|
|
|
|
sha256 "c62ccd9efa4f93b290b846942c16df504c8546637d24f038c5f2855bb5b992e8" => :el_capitan
|
|
|
|
sha256 "5e2a430023e6bc4273fc1054303e5e8e84e822ebefafc16ff686ef67db1882cf" => :yosemite
|
|
|
|
sha256 "7e57cf0300d8f31e45129402d9d3137619b2ee34630f4be81a5b33f68229b17d" => :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
|
|
|
|
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
|
|
|
|
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
|