From cf6ded7d77b69ebb1c0094a0e0886eefd48d8125 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Tue, 3 Dec 2024 01:03:36 -0500 Subject: [PATCH 1/2] gosec: update build and add version check Signed-off-by: Rui Chen --- Formula/g/gosec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Formula/g/gosec.rb b/Formula/g/gosec.rb index de5c52d68d48..59eac318794d 100644 --- a/Formula/g/gosec.rb +++ b/Formula/g/gosec.rb @@ -18,10 +18,13 @@ class Gosec < Formula depends_on "go" def install - system "go", "build", *std_go_args(ldflags: "-X main.version=v#{version}"), "./cmd/gosec" + ldflags = "-s -w -X main.Version=#{version} -X main.GitTag= -X main.BuildDate=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/gosec" end test do + assert_match version.to_s, shell_output("#{bin}/gosec --version") + (testpath/"test.go").write <<~GO package main From f73c3feb94e305c88f3ea1b822a6338f9f2d8abc Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:20:06 +0000 Subject: [PATCH 2/2] gosec: update 2.21.4 bottle. --- Formula/g/gosec.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Formula/g/gosec.rb b/Formula/g/gosec.rb index 59eac318794d..37fb0790d6d4 100644 --- a/Formula/g/gosec.rb +++ b/Formula/g/gosec.rb @@ -7,12 +7,13 @@ class Gosec < Formula head "https://github.com/securego/gosec.git", branch: "master" bottle do - sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5571a78eebcc2894002a97d6a0c61aa1e07e982720df4c1dc5696afa96b12de" - sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5571a78eebcc2894002a97d6a0c61aa1e07e982720df4c1dc5696afa96b12de" - sha256 cellar: :any_skip_relocation, arm64_ventura: "b5571a78eebcc2894002a97d6a0c61aa1e07e982720df4c1dc5696afa96b12de" - sha256 cellar: :any_skip_relocation, sonoma: "e74361f658185b11b73634ccb6c243da37dfef808d38a924f4bd4728ebec728b" - sha256 cellar: :any_skip_relocation, ventura: "e74361f658185b11b73634ccb6c243da37dfef808d38a924f4bd4728ebec728b" - sha256 cellar: :any_skip_relocation, x86_64_linux: "ddb2653a49926b73033c002e1b3fd9ec25d0a97d6df7e3ddc002d72fe422cabb" + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0193dd59288ec01a5cf4679b3a6ae4da8c4d02e39bd799d0cfb0e2492d634f6b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0193dd59288ec01a5cf4679b3a6ae4da8c4d02e39bd799d0cfb0e2492d634f6b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0193dd59288ec01a5cf4679b3a6ae4da8c4d02e39bd799d0cfb0e2492d634f6b" + sha256 cellar: :any_skip_relocation, sonoma: "60cab52631b73a9eb2b9f74f1aeef0f5a66902009412d43b3395c4c041dc023a" + sha256 cellar: :any_skip_relocation, ventura: "60cab52631b73a9eb2b9f74f1aeef0f5a66902009412d43b3395c4c041dc023a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca434b1c6fb412c4f5da4b318380e148632417fd7e4f69ba18eed3f7a043c637" end depends_on "go"