From 2fab51784f32377a47516c79b13ddd7795428374 Mon Sep 17 00:00:00 2001 From: Tuomo Tanskanen Date: Wed, 14 Aug 2024 11:30:31 +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 96fba96e..b4290534 100755 --- a/hack/verify-release.sh +++ b/hack/verify-release.sh @@ -636,7 +636,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 }