Skip to content

Commit

Permalink
Enhance the check make target to ensure the Go version adheres to `…
Browse files Browse the repository at this point in the history
…x.y.0`. (#930)
  • Loading branch information
renormalize authored Nov 19, 2024
1 parent b4e1052 commit 7363947
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion hack/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,15 @@ if [[ "$unformatted_files" ]]; then
exit 1
fi

echo "All checks successful"
echo "Checking Go version"
GOVERSION=$(go list -f {{.GoVersion}} -m)
if [[ $GOVERSION =~ ^[0-9]+\.[0-9]+\.0$ ]]; then
# Go version is valid, adheres to x.y.0 version
exit 0
else
echo "Go version is invalid, please adhere to x.y.0 version"
echo "See https://github.com/gardener/etcd-druid/pull/925"
exit 1
fi

echo "All checks successful"

0 comments on commit 7363947

Please sign in to comment.