node_exporter: remove gopath
Closes #48072. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
9c38782bd1
commit
1f2604c4a0
1 changed files with 7 additions and 13 deletions
|
@ -15,19 +15,13 @@ class NodeExporter < Formula
|
|||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
|
||||
(buildpath/"src/github.com/prometheus/node_exporter").install buildpath.children
|
||||
cd "src/github.com/prometheus/node_exporter" do
|
||||
ldflags = %W[
|
||||
-X github.com/prometheus/common/version.Version=#{version}
|
||||
-X github.com/prometheus/common/version.BuildUser=Homebrew
|
||||
]
|
||||
system "go", "build", "-o", bin/"node_exporter",
|
||||
"-ldflags", ldflags.join(" "),
|
||||
"github.com/prometheus/node_exporter"
|
||||
prefix.install_metafiles
|
||||
end
|
||||
ldflags = %W[
|
||||
-X github.com/prometheus/common/version.Version=#{version}
|
||||
-X github.com/prometheus/common/version.BuildUser=Homebrew
|
||||
]
|
||||
system "go", "build", "-ldflags", ldflags.join(" "), "-trimpath",
|
||||
"-o", bin/"node_exporter"
|
||||
prefix.install_metafiles
|
||||
end
|
||||
|
||||
def caveats; <<~EOS
|
||||
|
|
Loading…
Reference in a new issue