From 110c7799990b7cb06c9b9f2150a09c2eae87a94e Mon Sep 17 00:00:00 2001 From: Tuomo Tanskanen Date: Wed, 14 Aug 2024 12:51:28 +0300 Subject: [PATCH] fix verify-release.sh to understand go directive better Currently it fails to do the vulnerability scan if the go directive has golang patch version in it, like "1.22.3", as it replaces "1.22" with "1.22.5" it finds from Dockerfile, resulting to "1.22.5.3" which blows up. Signed-off-by: Tuomo Tanskanen --- hack/verify-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/verify-release.sh b/hack/verify-release.sh index 0c02e0ef29..65a74af242 100755 --- a/hack/verify-release.sh +++ b/hack/verify-release.sh @@ -639,7 +639,7 @@ _mutate_gomod_files_for_osv_scanner() <(_get_golang_version_from_dockerfile) for modfile in **/go.mod; do - sed -i.bak -e "s/^go [[:digit:]]\.[[:digit:]]\+/go ${tag}/" "${modfile}" + sed -i.bak -e "s/^go .*$/go ${tag}/" "${modfile}" done }