ark 0.8.2 (new formula)
Closes #28810. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
4325536354
commit
738738b250
1 changed files with 29 additions and 0 deletions
29
Formula/ark.rb
Normal file
29
Formula/ark.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
class Ark < Formula
|
||||
desc "Disaster recovery for Kubernetes cluster resources and persistent volumes"
|
||||
homepage "https://github.com/heptio/ark"
|
||||
url "https://github.com/heptio/ark/archive/v0.8.2.tar.gz"
|
||||
sha256 "149b5262e9e113a8963cd97e1b32c6cfc1eea23b2cc45ffdda9b81a789da3e26"
|
||||
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
(buildpath/"src/github.com/heptio/ark").install buildpath.children
|
||||
|
||||
cd "src/github.com/heptio/ark" do
|
||||
system "go", "build", "-o", bin/"ark", "-installsuffix", "static",
|
||||
"-ldflags",
|
||||
"-X github.com/heptio/ark/pkg/buildinfo.Version=#{version}",
|
||||
"./cmd/ark"
|
||||
prefix.install_metafiles
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
output = shell_output("#{bin}/ark 2>&1")
|
||||
assert_match "Heptio Ark is a tool for managing disaster recovery", output
|
||||
assert_match "Version: #{version}", shell_output("#{bin}/ark version 2>&1")
|
||||
system bin/"ark", "client", "config", "set", "TEST=value"
|
||||
assert_match "value", shell_output("#{bin}/ark client config get 2>&1")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue