From 024c7f6d9d1ce147849bfc6a942c44f1270e4e5c Mon Sep 17 00:00:00 2001 From: waqas-ashraf-venturedive Date: Tue, 24 Mar 2026 21:34:41 +0500 Subject: [PATCH 1/4] #154 Add Windows build and archive configurations Signed-off-by: waqas-ashraf-venturedive --- .goreleaser.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 583cd7f9..2aa7d8af 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -48,6 +48,14 @@ builds: env: - QUILL_LOG_FILE=/tmp/quill-{{ .Target }}.log + - id: windows-build + dir: ./cmd/syft + binary: syft + goos: [windows] + goarch: [amd64, arm64] + mod_timestamp: *build-timestamp + ldflags: *build-ldflags + archives: - id: linux-archives builds: @@ -56,6 +64,12 @@ archives: builds: - darwin-build + - id: windows-archives + formats: + - zip + builds: + - windows-build + nfpms: - license: "Apache 2.0" maintainer: "Anchore, Inc" From 40e818297db5f41d05513f3c03e1c27c2e109abf Mon Sep 17 00:00:00 2001 From: waqas-ashraf-venturedive Date: Tue, 24 Mar 2026 21:43:50 +0500 Subject: [PATCH 2/4] Change build configuration for Windows binary Signed-off-by: waqas-ashraf-venturedive --- .goreleaser.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2aa7d8af..94b5f72c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -49,8 +49,8 @@ builds: - QUILL_LOG_FILE=/tmp/quill-{{ .Target }}.log - id: windows-build - dir: ./cmd/syft - binary: syft + dir: ./cmd/grant + binary: grant goos: [windows] goarch: [amd64, arm64] mod_timestamp: *build-timestamp From 5702a97a5b10dc052693844c9fc14acae07a2f25 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 2 Oct 2026 10:47:46 -0400 Subject: [PATCH 3/4] chore: use `ids` instead of deprecated `builds` on archives `archives.builds` was deprecated in goreleaser v2.8 and fails `goreleaser check`. Switches all three archive entries to `ids:`, matching syft and grype. Signed-off-by: Alex Goodman --- .goreleaser.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 94b5f72c..d2de500f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -58,16 +58,15 @@ builds: archives: - id: linux-archives - builds: + ids: - linux-build - id: darwin-archives - builds: + ids: - darwin-build - - id: windows-archives formats: - zip - builds: + ids: - windows-build nfpms: From fbd646979a9b20461efc0daadc58cb5667294c10 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 2 Oct 2026 11:26:19 -0400 Subject: [PATCH 4/4] test: cover windows zip assets in install.sh tests The snapshot asset count assertions failed once the windows zips showed up. Adds the windows amd64/arm64 zip cases to the download and install suites and counts zip archives alongside tar, matching syft. Signed-off-by: Alex Goodman --- tests/install/1_download_snapshot_asset_test.sh | 2 ++ tests/install/3_install_asset_test.sh | 2 ++ tests/install/test_harness.sh | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/install/1_download_snapshot_asset_test.sh b/tests/install/1_download_snapshot_asset_test.sh index 61f7ffd6..4066506f 100755 --- a/tests/install/1_download_snapshot_asset_test.sh +++ b/tests/install/1_download_snapshot_asset_test.sh @@ -79,6 +79,8 @@ run_test_case test_positive_snapshot_download_asset "linux" "ppc64le" "rpm" run_test_case test_positive_snapshot_download_asset "linux" "ppc64le" "deb" run_test_case test_positive_snapshot_download_asset "darwin" "amd64" "tar.gz" run_test_case test_positive_snapshot_download_asset "darwin" "arm64" "tar.gz" +run_test_case test_positive_snapshot_download_asset "windows" "amd64" "zip" +run_test_case test_positive_snapshot_download_asset "windows" "arm64" "zip" # note: the mac signing process produces a dmg which is not part of the snapshot process (thus is not exercised here) # let's make certain we covered all assets that were expected diff --git a/tests/install/3_install_asset_test.sh b/tests/install/3_install_asset_test.sh index e18737c0..88dc0c92 100755 --- a/tests/install/3_install_asset_test.sh +++ b/tests/install/3_install_asset_test.sh @@ -96,6 +96,8 @@ run_test_case test_positive_snapshot_install_asset "linux" "s390x" "tar.gz" run_test_case test_positive_snapshot_install_asset "linux" "ppc64le" "tar.gz" run_test_case test_positive_snapshot_install_asset "darwin" "amd64" "tar.gz" run_test_case test_positive_snapshot_install_asset "darwin" "arm64" "tar.gz" +run_test_case test_positive_snapshot_install_asset "windows" "amd64" "zip" +run_test_case test_positive_snapshot_install_asset "windows" "arm64" "zip" # let's make certain we covered all assets that were expected run_test_case test_install_asset_exercised_all_archive_assets diff --git a/tests/install/test_harness.sh b/tests/install/test_harness.sh index f78e207d..ddaffdba 100644 --- a/tests/install/test_harness.sh +++ b/tests/install/test_harness.sh @@ -199,7 +199,7 @@ snapshot_assets_archive_count() { # ../../snapshot/grant_0.2.1-SNAPSHOT-e5e847a_linux_amd64.tar.gz # ../../snapshot/grant_0.2.1-SNAPSHOT-e5e847a_darwin_amd64.tar.gz - echo "$(find ../../snapshot -maxdepth 1 -type f | grep 'grant_' | grep 'tar' | wc -l | tr -d '[:space:]')" + echo "$(find ../../snapshot -maxdepth 1 -type f | grep 'grant_' | grep 'tar\|zip' | wc -l | tr -d '[:space:]')" }