1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00

chore: reduce repetition of go versions

when we cut a new release of descheduler, we have to update the go version in multiple places
which presents an opportunity to miss updating one.

Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
This commit is contained in:
Amir Alavi
2024-06-08 12:48:53 -04:00
parent 8714397ba6
commit 2ae79bee64
5 changed files with 34 additions and 14 deletions

View File

@@ -20,13 +20,9 @@ set -o nounset
set -o pipefail
DESCHEDULER_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${DESCHEDULER_ROOT}/hack/lib/go.sh"
GO_VERSION=($(go version))
if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.18|go1.19|go1.20|go1.21|go1.22') ]]; then
echo "Unknown go version '${GO_VERSION[2]}', skipping gofmt."
exit 1
fi
go::verify_version
cd "${DESCHEDULER_ROOT}"