dep: set version in ldflags

Closes #23200.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2018-01-23 09:02:00 -08:00
parent 46df03b067
commit b6bf7cc8b4

View file

@ -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