Skip to content

Commit

Permalink
fix verify-release.sh to understand go directive better
Browse files Browse the repository at this point in the history
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 <tuomo.tanskanen@est.tech>
  • Loading branch information
tuminoid authored and metal3-io-bot committed Aug 14, 2024
1 parent e2216e5 commit 2fab517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/verify-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 2fab517

Please sign in to comment.