velero: fix version injection
Closes #39609. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
192890a81e
commit
92999076b1
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ class Velero < Formula
|
||||||
homepage "https://github.com/heptio/velero"
|
homepage "https://github.com/heptio/velero"
|
||||||
url "https://github.com/heptio/velero/archive/v0.11.0.tar.gz"
|
url "https://github.com/heptio/velero/archive/v0.11.0.tar.gz"
|
||||||
sha256 "366f4c1ed5800dbdddefa60ed88bdd82b406b69b76a214b1d7108997a2f973ac"
|
sha256 "366f4c1ed5800dbdddefa60ed88bdd82b406b69b76a214b1d7108997a2f973ac"
|
||||||
revision 1
|
revision 2
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
cellar :any_skip_relocation
|
cellar :any_skip_relocation
|
||||||
|
@ -22,7 +22,7 @@ class Velero < Formula
|
||||||
cd dir do
|
cd dir do
|
||||||
system "go", "build", "-o", bin/"velero", "-installsuffix", "static",
|
system "go", "build", "-o", bin/"velero", "-installsuffix", "static",
|
||||||
"-ldflags",
|
"-ldflags",
|
||||||
"-X github.com/heptio/velero/pkg/buildinfo.Version=#{version}",
|
"-X github.com/heptio/velero/pkg/buildinfo.Version=v#{version}",
|
||||||
"./cmd/velero"
|
"./cmd/velero"
|
||||||
|
|
||||||
# Install bash completion
|
# Install bash completion
|
||||||
|
@ -40,7 +40,7 @@ class Velero < Formula
|
||||||
test do
|
test do
|
||||||
output = shell_output("#{bin}/velero 2>&1")
|
output = shell_output("#{bin}/velero 2>&1")
|
||||||
assert_match "Velero is a tool for managing disaster recovery", output
|
assert_match "Velero is a tool for managing disaster recovery", output
|
||||||
assert_match "Version: #{version}", shell_output("#{bin}/velero version --client-only 2>&1")
|
assert_match "Version: v#{version}", shell_output("#{bin}/velero version --client-only 2>&1")
|
||||||
system bin/"velero", "client", "config", "set", "TEST=value"
|
system bin/"velero", "client", "config", "set", "TEST=value"
|
||||||
assert_match "value", shell_output("#{bin}/velero client config get 2>&1")
|
assert_match "value", shell_output("#{bin}/velero client config get 2>&1")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue