Skip to content

Commit f7884f0

Browse files
denyeartale-linux
authored andcommitted
Go version check - print warning for higher release
If Go release is higher than expected CI release, CI checks may not work, print a Warning. e.g. Current Fabric expects Go 1.18 and goimports will currently fail with Go 1.19. Signed-off-by: David Enyeart <[email protected]>
1 parent b33e614 commit f7884f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/check_go_version.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ patch () {
3333
# go release must be >= ci release
3434
[ "$(release "$GO_VERSION")" -ge "$(release "$CI_VERSION")" ] || fail
3535

36+
# If go release is greater than the expected ci release, things may not work, print a warning.
37+
if [ "$(release "$GO_VERSION")" -gt "$(release "$CI_VERSION")" ]; then
38+
echo "WARNING: Your Go release $GO_VERSION is greater than expected release $CI_VERSION, CI may or may not work depending on Go changes."
39+
fi
40+
3641
# if releases are equal, patch must be >= ci patch
3742
if [ "$(release "$GO_VERSION")" -eq "$(release "$CI_VERSION")" ]; then
3843
[ "$(patch "$GO_VERSION")" -ge "$(patch "$CI_VERSION")" ] || fail

0 commit comments

Comments
 (0)