File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 7676 - run : make style
7777 - run : make -C sigv4 style
7878 - run : make -C assets style
79+ - run : make check-go-mod-version
7980 - when :
8081 condition : << parameters.use_gomod_cache >>
8182 steps :
Original file line number Diff line number Diff line change @@ -19,3 +19,8 @@ test:: deps check_license unused common-test lint
1919.PHONY : generate-testdata
2020generate-testdata :
2121 @cd config && go run generate.go
22+
23+ .PHONY : check-go-mod-version
24+ check-go-mod-version :
25+ @echo " >> checking go.mod version matching"
26+ @./scripts/check-go-mod-version.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ readarray -t mod_files < <( find . -type f -name go.mod)
4+
5+ echo " Checking files ${mod_files[@]} "
6+
7+ matches=$( awk ' $1 == "go" {print $2}' " ${mod_files[@]} " | sort -u | wc -l)
8+
9+ if [[ " ${matches} " -ne 1 ]]; then
10+ echo ' Not all go.mod files have matching go versions'
11+ exit 1
12+ fi
You can’t perform that action at this time.
0 commit comments