dep: set version in ldflags
Closes #23200. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
46df03b067
commit
b6bf7cc8b4
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,8 @@ class Dep < Formula
|
|||
ENV["GOPATH"] = buildpath
|
||||
(buildpath/"src/github.com/golang/dep").install buildpath.children
|
||||
cd "src/github.com/golang/dep" do
|
||||
system "go", "build", "-o", bin/"dep", ".../cmd/dep"
|
||||
system "go", "build", "-o", bin/"dep", "-ldflags",
|
||||
"-X main.version=#{version}", ".../cmd/dep"
|
||||
prefix.install_metafiles
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue