Skip to content

Commit b94c26d

Browse files
committed
fix: homebrew template
1 parent 7df6e7f commit b94c26d

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

hack/homebrew/gitops.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ class Gitops < Formula
77
depends_on "go" => :build
88

99
def install
10-
# ENV["GOPATH"] = buildpath
11-
path = buildpath/"cmd/gitops"
12-
cd path do
13-
system "go", "build", "-ldflags=\"-s -w -X 'main.version=${RELEASE_VERSION}'\"" "-o", "#{bin}/gitops"
10+
ldflags = "-s -w -X main.version=#{version}"
11+
cd "cmd/gitops" do
12+
system "go", "build", *std_go_args(ldflags: ldflags)
1413
end
1514
end
1615

1716
test do
18-
shell_output("#{bin}/gitops", "-h")
17+
shell_output("#{bin}/gitops", "--version")
1918
end
2019
end

0 commit comments

Comments
 (0)