mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
fix verify-gofmt's version detection
This commit is contained in:
parent
9564dacf6c
commit
50eb2cf59c
@ -17,10 +17,9 @@
|
|||||||
# GoFmt apparently is changing @ head...
|
# GoFmt apparently is changing @ head...
|
||||||
|
|
||||||
GO_VERSION=($(go version))
|
GO_VERSION=($(go version))
|
||||||
echo "Detected go version: $(go version)"
|
|
||||||
|
|
||||||
if [[ ${GO_VERSION[2]} != "go1.2" && ${GO_VERSION[2]} != "go1.3" ]]; then
|
if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3') ]]; then
|
||||||
echo "Unknown go version, skipping gofmt."
|
echo "Unknown go version '${GO_VERSION}', skipping gofmt."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user