homebrew-core/Formula/skaffold.rb
2019-05-24 16:26:18 +08:00

40 lines
1.3 KiB
Ruby

class Skaffold < Formula
desc "Easy and Repeatable Kubernetes Development"
homepage "https://github.com/GoogleContainerTools/skaffold"
url "https://github.com/GoogleContainerTools/skaffold.git",
:tag => "v0.30.0",
:revision => "fe31429012110e6fd70f97971288bd266ba95bed"
head "https://github.com/GoogleContainerTools/skaffold.git"
bottle do
cellar :any_skip_relocation
sha256 "16f6bf431895a100d2ae410111eaebb19b6db5e48c426861dc283196435dbac3" => :mojave
sha256 "6cbef1dda14f97e1649d9e75d8e6817b45bd0c52d974bac58ed11305b82f39fb" => :high_sierra
sha256 "09a469dc9b5345c7b7d1b6e065bebe42d56c11885ec832c7168a8c73b50ecdde" => :sierra
end
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
dir = buildpath/"src/github.com/GoogleContainerTools/skaffold"
dir.install buildpath.children - [buildpath/".brew_home"]
cd dir do
system "make"
bin.install "out/skaffold"
output = Utils.popen_read("#{bin}/skaffold completion bash")
(bash_completion/"skaffold").write output
output = Utils.popen_read("#{bin}/skaffold completion zsh")
(zsh_completion/"_skaffold").write output
prefix.install_metafiles
end
end
test do
output = shell_output("#{bin}/skaffold version --output {{.GitTreeState}}")
assert_match "clean", output
end
end