From 4375bc065388c1fdf03e1bd1bfb28275137fb2b2 Mon Sep 17 00:00:00 2001 From: Anthony Fielding Date: Tue, 12 Nov 2024 13:03:31 +0000 Subject: [PATCH 1/3] Create scan_health.rb --- Formula/scan_health.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Formula/scan_health.rb diff --git a/Formula/scan_health.rb b/Formula/scan_health.rb new file mode 100644 index 0000000..649690e --- /dev/null +++ b/Formula/scan_health.rb @@ -0,0 +1,31 @@ +class ScanHealth < Formula + desc "Gain insight into the health of a Veracode SAST scan" + homepage "https://github.com/veracode/scan_health" + url "https://github.com/veracode/scan_health.git", + tag: "2.46", + revision: "2cdbe3d1a958d6d0aebf7b1f71316d737093e59e" + license "MIT" + version_scheme 1 + head "https://github.com/veracode/scan_health", branch: "main" + + if OS.mac? + if Hardware::CPU.arm? + url "https://github.com/veracode/scan_health/releases/download/2.46/scan_health-mac-arm64" + sha256 "a6bd925cd7b81b478f6265d1f708e74d74b95c04260edbb59c7e6229e7e02622" + elsif Hardware::CPU.intel? + url "https://github.com/veracode/scan_health/releases/download/2.46/scan_health-mac-amd64" + sha256 "bfa38ee1b40fca670398fff284e2d2895191363b6276068764ab8a01402b431d" + end + elsif OS.linux? + url "https://github.com/veracode/scan_health/releases/download/2.46/scan_health-linux-amd64" + sha256 "9f994bbd2dac8b47d74d220b2aea2b0abf9a7c93ce6d2456ed8ad2923d1f4f3e" + end + + def install + bin.install "scan_health-mac-arm64" => "scan_health" + end + + test do + system "#{bin}/scan_health", "--help" + end +end From ce17ab70e3cfbac8c97dc143dc74bbc3c914df81 Mon Sep 17 00:00:00 2001 From: Anthony Fielding Date: Tue, 12 Nov 2024 13:49:40 +0000 Subject: [PATCH 2/3] Fix URL --- Formula/scan_health.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/scan_health.rb b/Formula/scan_health.rb index 649690e..6c99188 100644 --- a/Formula/scan_health.rb +++ b/Formula/scan_health.rb @@ -1,12 +1,12 @@ class ScanHealth < Formula desc "Gain insight into the health of a Veracode SAST scan" homepage "https://github.com/veracode/scan_health" - url "https://github.com/veracode/scan_health.git", + url "https://github.com/veracode/scan_health", tag: "2.46", revision: "2cdbe3d1a958d6d0aebf7b1f71316d737093e59e" license "MIT" version_scheme 1 - head "https://github.com/veracode/scan_health", branch: "main" + head "https://github.com/veracode/scan_health.git", branch: "main" if OS.mac? if Hardware::CPU.arm? From 7c27b64aff63a0b52a213e3eb27e7537190977d3 Mon Sep 17 00:00:00 2001 From: Anthony Fielding Date: Tue, 12 Nov 2024 14:11:27 +0000 Subject: [PATCH 3/3] Fix test path --- Formula/scan_health.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/scan_health.rb b/Formula/scan_health.rb index 6c99188..5c8ce9a 100644 --- a/Formula/scan_health.rb +++ b/Formula/scan_health.rb @@ -26,6 +26,6 @@ def install end test do - system "#{bin}/scan_health", "--help" + system bin/"scan_health", "--help" end end