mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
bump goreleaser to v1.10.3 (#1123)
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
co-authored by
Christopher Phillips
parent
d1729ee7e2
commit
62897fbc89
@@ -222,10 +222,16 @@ func getSyftBinaryLocation(t testing.TB) string {
|
||||
}
|
||||
|
||||
func getSyftBinaryLocationByOS(t testing.TB, goOS string) string {
|
||||
// note: for amd64 we need to update the snapshot location with the v1 suffix
|
||||
// see : https://goreleaser.com/customization/build/#why-is-there-a-_v1-suffix-on-amd64-builds
|
||||
archPath := runtime.GOARCH
|
||||
if runtime.GOARCH == "amd64" {
|
||||
archPath = fmt.Sprintf("%s_v1", archPath)
|
||||
}
|
||||
// note: there is a subtle - vs _ difference between these versions
|
||||
switch goOS {
|
||||
case "darwin", "linux":
|
||||
return path.Join(repoRoot(t), fmt.Sprintf("snapshot/%s-build_%s_%s/syft", goOS, goOS, runtime.GOARCH))
|
||||
return path.Join(repoRoot(t), fmt.Sprintf("snapshot/%s-build_%s_%s/syft", goOS, goOS, archPath))
|
||||
default:
|
||||
t.Fatalf("unsupported OS: %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ else
|
||||
fi
|
||||
|
||||
# run syft
|
||||
SYFT_PATH="${DISTDIR}/darwin-build_darwin_amd64/syft"
|
||||
SYFT_PATH="${DISTDIR}/darwin-build_darwin_amd64_v1/syft"
|
||||
chmod 755 "${SYFT_PATH}"
|
||||
"${SYFT_PATH}" version
|
||||
SYFT_CHECK_FOR_APP_UPDATE=0 "${SYFT_PATH}" packages docker-archive:${TEST_IMAGE_TAR} -vv -o json > "${REPORT}"
|
||||
|
||||
+1
-1
@@ -53,4 +53,4 @@ ${ACC_DIR}/compare.py \
|
||||
${GOLDEN_REPORT} \
|
||||
${REPORT} | tee ${RESULTSDIR}/acceptance-${TEST_TYPE}.txt
|
||||
|
||||
EXIT_CODE=0
|
||||
EXIT_CODE=0
|
||||
|
||||
@@ -26,6 +26,12 @@ test_positive_snapshot_install_asset() {
|
||||
expected_path="${install_dir}/${binary}"
|
||||
assertFileExists "${expected_path}" "install_asset os=${os} arch=${arch} format=${format}"
|
||||
|
||||
# directory structure for arch has been updated as of go 1.18
|
||||
# https://goreleaser.com/customization/build/#why-is-there-a-_v1-suffix-on-amd64-buildsjk
|
||||
if [ $arch == "amd64" ]; then
|
||||
arch="amd64_v1"
|
||||
fi
|
||||
|
||||
assertFilesEqual \
|
||||
"$(snapshot_dir)/${os}-build_${os}_${arch}/${binary}" \
|
||||
"${expected_path}" \
|
||||
|
||||
Reference in New Issue
Block a user