hcloud: fix setting version
Closes #28467. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
ec220c761e
commit
d184e8870a
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,7 @@ class Hcloud < Formula
|
|||
(buildpath/"src/github.com/hetznercloud/cli").install buildpath.children
|
||||
|
||||
cd "src/github.com/hetznercloud/cli" do
|
||||
ldflags = "-w -X github.com/hetznercloud/cli.Version=v#{version}"
|
||||
ldflags = "-w -X github.com/hetznercloud/cli/cli.Version=v#{version}"
|
||||
system "go", "build", "-o", bin/"hcloud", "-ldflags", ldflags,
|
||||
"./cmd/hcloud"
|
||||
prefix.install_metafiles
|
||||
|
@ -42,5 +42,6 @@ class Hcloud < Formula
|
|||
EOS
|
||||
assert_match "test", shell_output("#{bin}/hcloud context list")
|
||||
assert_match "test", shell_output("#{bin}/hcloud context active")
|
||||
assert_match "hcloud v#{version}", shell_output("#{bin}/hcloud version")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue