From 57479c129f3b01d63b003084e65ec045d1c54ec2 Mon Sep 17 00:00:00 2001 From: Yash sharma Date: Thu, 15 Aug 2024 21:41:36 +0530 Subject: [PATCH] Require manual Go version updates for patch versions (#5848) --- scripts/check-go-version.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/check-go-version.sh b/scripts/check-go-version.sh index b2c74881481..a32e6e7254e 100755 --- a/scripts/check-go-version.sh +++ b/scripts/check-go-version.sh @@ -69,6 +69,11 @@ function check() { fi if [[ $update = true && "$mismatch" != "" ]]; then + # Detect if the line includes a patch version + if [[ "$go_version" =~ $version_regex\.[0-9]+ ]]; then + echo "Patch version detected in $file. Manual update required." + exit 1 + fi update "$file" "$pattern" "$go_version" "$target" mismatch="*** => $target ***" fi @@ -78,7 +83,6 @@ function check() { check go.mod "^go\s\+$version_regex" "$go_previous_version" check internal/tools/go.mod "^go\s\+$version_regex" "$go_latest_version" - check docker/debug/Dockerfile "^.*golang:$version_regex" "$go_latest_version" IFS='|' read -r -a gha_workflows <<< "$(grep -rl go-version .github | tr '\n' '|')"