Skip to content

Commit f778361

Browse files
authored
Merge pull request Homebrew#236534 from Homebrew/telegraf-source-build
telegraf: fix source-build upgrade, remove postinstall
2 parents e050ae8 + 6bc5eff commit f778361

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Formula/t/telegraf.rb

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ class Telegraf < Formula
1212
end
1313

1414
bottle do
15-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "32b76c76a211d9f82bc7173c46d3bc596b12df53346c4cbbb3faf8c0f5706433"
16-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "a40ce2bda23e47415765fa64d745fadd422bea9304c74dace38300a609a20b7c"
17-
sha256 cellar: :any_skip_relocation, arm64_ventura: "3d8a2ef52ec35dfc9aed3c35e265160a90f2bf031e0c5bdd13c887736bb7cd74"
18-
sha256 cellar: :any_skip_relocation, sonoma: "d3ce755689d77fb78b9fb1a22f9985fb0fe8feaf733551446c3a25317c9186c0"
19-
sha256 cellar: :any_skip_relocation, ventura: "1c144191bc4476f02c5e70d9553a6af8895fe8250ac2497e89dc2fd71304130b"
20-
sha256 cellar: :any_skip_relocation, x86_64_linux: "3fdd0eadd45c0b3665d84d3788b2efd14e1a0ef6aff993d2208434059af148e0"
15+
rebuild 1
16+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "22faf15241c5bdc77af398a4b6feb7183ab9c96e246978b07a4b602fa0b87ebe"
17+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "486e6428641d76fd30562bc1183b07dab0cd2c45f1709cc585b037b7a336e368"
18+
sha256 cellar: :any_skip_relocation, arm64_ventura: "a4320924da539b6abd7cc3fe06055f98d5d2f23600a665ed5caf71c5281a5bf8"
19+
sha256 cellar: :any_skip_relocation, sonoma: "87932396ddc123a216b95631b570b401f3641ef1d72efe9f95e26d90f8bbca60"
20+
sha256 cellar: :any_skip_relocation, ventura: "c1e21d8d864d44b770ed1126d4a888e7c85da68c07fb3f5d1c130e7663978e86"
21+
sha256 cellar: :any_skip_relocation, x86_64_linux: "ff2c5639d6f48ee1cf9dd564c1f228f65d8f7e8ada0c39f6767044d654af8f91"
2122
end
2223

2324
depends_on "go" => :build
2425

2526
def install
2627
ldflags = "-s -w -X github.com/influxdata/telegraf/internal.Version=#{version}"
2728
system "go", "build", *std_go_args(ldflags:), "./cmd/telegraf"
28-
(etc/"telegraf.conf").write Utils.safe_popen_read(bin/"telegraf", "config")
29-
end
3029

31-
def post_install
30+
(buildpath/"telegraf.conf").write Utils.safe_popen_read(bin/"telegraf", "config")
31+
etc.install "telegraf.conf"
3232
# Create directory for additional user configurations
3333
(etc/"telegraf.d").mkpath
3434
end
@@ -44,7 +44,6 @@ def post_install
4444
test do
4545
assert_match version.to_s, shell_output("#{bin}/telegraf --version")
4646
(testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config")
47-
system bin/"telegraf", "-config", testpath/"config.toml", "-test",
48-
"-input-filter", "cpu:mem"
47+
system bin/"telegraf", "-config", testpath/"config.toml", "-test", "-input-filter", "cpu:mem"
4948
end
5049
end

0 commit comments

Comments
 (0)