diff --git a/Formula/logcli.rb b/Formula/logcli.rb index 706ce62da3dc..8c73d12ddc0c 100644 --- a/Formula/logcli.rb +++ b/Formula/logcli.rb @@ -1,8 +1,8 @@ class Logcli < Formula desc "Run LogQL queries against a Loki server" homepage "https://grafana.com/loki" - url "https://github.com/grafana/loki/archive/refs/tags/v2.5.0.tar.gz" - sha256 "f9ca9e52f4d9125cc31f9a593aba6a46ed6464c9cd99b2be4e35192a0ab4a76e" + url "https://github.com/grafana/loki/archive/v2.6.1.tar.gz" + sha256 "4b41175e552dd198bb9cae213df3c0d9ca8cacd0b673f79d26419cea7cfb2df7" license "AGPL-3.0-only" head "https://github.com/grafana/loki.git", branch: "main" @@ -19,8 +19,7 @@ class Logcli < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "42067a26764bbb5b3eeb1d03e5979a3f390107fbaeed9cd40df6f03e1c4f5132" end - # Bump to 1.18 on the next release, if possible. - depends_on "go@1.17" => :build + depends_on "go" => :build depends_on "loki" => :test resource "testdata" do @@ -29,7 +28,7 @@ class Logcli < Formula end def install - system "go", "build", *std_go_args, "./cmd/logcli" + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/logcli" end test do @@ -44,7 +43,6 @@ def install fork { exec Formula["loki"].bin/"loki", "-config.file=loki-local-config.yaml" } sleep 3 - output = shell_output("#{bin}/logcli --addr=http://localhost:#{port} labels") - assert_match "__name__", output + assert_empty shell_output("#{bin}/logcli --addr=http://localhost:#{port} labels") end end diff --git a/Formula/loki.rb b/Formula/loki.rb index 0efb9f383de9..25d229e233bd 100644 --- a/Formula/loki.rb +++ b/Formula/loki.rb @@ -1,8 +1,8 @@ class Loki < Formula desc "Horizontally-scalable, highly-available log aggregation system" homepage "https://grafana.com/loki" - url "https://github.com/grafana/loki/archive/refs/tags/v2.5.0.tar.gz" - sha256 "f9ca9e52f4d9125cc31f9a593aba6a46ed6464c9cd99b2be4e35192a0ab4a76e" + url "https://github.com/grafana/loki/archive/v2.6.1.tar.gz" + sha256 "4b41175e552dd198bb9cae213df3c0d9ca8cacd0b673f79d26419cea7cfb2df7" license "AGPL-3.0-only" head "https://github.com/grafana/loki.git", branch: "main" @@ -15,12 +15,11 @@ class Loki < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "ea5d4efa0852c44b33278bb6eee967dacf8b7c48a32908452a815da1c91cf8e0" end - # Bump to 1.18 on the next release, if possible. - depends_on "go@1.17" => :build + depends_on "go" => :build def install cd "cmd/loki" do - system "go", "build", *std_go_args + system "go", "build", *std_go_args(ldflags: "-s -w") inreplace "loki-local-config.yaml", "/tmp", var etc.install "loki-local-config.yaml" end diff --git a/Formula/promtail.rb b/Formula/promtail.rb index 478397620325..fef6c26e5d71 100644 --- a/Formula/promtail.rb +++ b/Formula/promtail.rb @@ -1,8 +1,8 @@ class Promtail < Formula desc "Log agent for Loki" homepage "https://grafana.com/loki" - url "https://github.com/grafana/loki/archive/refs/tags/v2.5.0.tar.gz" - sha256 "f9ca9e52f4d9125cc31f9a593aba6a46ed6464c9cd99b2be4e35192a0ab4a76e" + url "https://github.com/grafana/loki/archive/v2.6.1.tar.gz" + sha256 "4b41175e552dd198bb9cae213df3c0d9ca8cacd0b673f79d26419cea7cfb2df7" license "AGPL-3.0-only" head "https://github.com/grafana/loki.git", branch: "main" @@ -19,8 +19,7 @@ class Promtail < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "78231035a114c603adbe37b031766fe239d3c83dbc34abdefa329d44530a2243" end - # Bump to 1.18 on the next release, if possible. - depends_on "go@1.17" => :build + depends_on "go" => :build on_linux do depends_on "systemd" @@ -28,7 +27,7 @@ class Promtail < Formula def install cd "clients/cmd/promtail" do - system "go", "build", *std_go_args + system "go", "build", *std_go_args(ldflags: "-s -w") etc.install "promtail-local-config.yaml" end end