homebrew-core/Formula/landscaper.rb
2017-10-11 13:57:17 -04:00

41 lines
1.4 KiB
Ruby

class Landscaper < Formula
desc "Manage the application landscape in a Kubernetes cluster"
homepage "https://github.com/Eneco/landscaper"
url "https://github.com/Eneco/landscaper.git",
:tag => "1.0.11",
:revision => "4fd0758658b712e24f71a966eea7ab2bf0d8c15b"
head "https://github.com/Eneco/landscaper.git"
bottle do
cellar :any_skip_relocation
sha256 "31cb813c0d2e9e5e13051e5f687f0f7c81e0c6575e8b36abea579ff348399c5b" => :high_sierra
sha256 "dc237afff0749bfca2ecd5559853e1ab287687e7453f4467c86a7031f3f20d0f" => :sierra
sha256 "b79291aab46e45bd7ae380df9730c56796a2e6228a79898db58b28971f33e94a" => :el_capitan
end
depends_on "go" => :build
depends_on "glide" => :build
depends_on "kubernetes-cli" => :run
depends_on "kubernetes-helm" => :run
def install
ENV["GOPATH"] = buildpath
ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
ENV.prepend_create_path "PATH", buildpath/"bin"
arch = MacOS.prefer_64_bit? ? "amd64" : "x86"
ENV["TARGETS"] = "darwin/#{arch}"
dir = buildpath/"src/github.com/eneco/landscaper"
dir.install buildpath.children - [buildpath/".brew_home"]
cd dir do
system "make", "bootstrap"
system "make", "build"
bin.install "build/landscaper"
prefix.install_metafiles
end
end
test do
assert_match "This is Landscaper v#{version}", pipe_output("#{bin}/landscaper apply 2>&1")
end
end