diff --git a/hack/validate b/hack/validate index afe5a1eb..1c037166 100755 --- a/hack/validate +++ b/hack/validate @@ -9,13 +9,6 @@ go mod tidy echo Running: go generate GOOS=linux CC=gcc CXX=g++ go generate -echo Running: go mod vendor -go mod vendor - -if [ -n "$SKIP_VALIDATE" ]; then - echo Skipping validation - exit -fi echo Running validation . ./hack/version.sh @@ -28,10 +21,8 @@ if [ -n "$DIRTY" ]; then fi echo Running: go version -DEPENDENCIES_URL="https://raw.githubusercontent.com/kubernetes/kubernetes/${VERSION_K8S}/build/dependencies.yaml" -GOLANG_VERSION=$(curl -sL "${DEPENDENCIES_URL}" | yq e '.dependencies[] | select(.name == "golang: upstream version").version' -) -if ! go version | grep -s "go version go${GOLANG_VERSION} "; then - echo "Unexpected $(go version) - Kubernetes ${VERSION_K8S} should be built with go version go${GOLANG_VERSION}" +if ! go version | grep -s "go version ${VERSION_GOLANG} "; then + echo "Unexpected $(go version) - Kubernetes ${VERSION_K8S} should be built with go version ${VERSION_GOLANG}" exit 1 fi @@ -47,5 +38,6 @@ if ! command -v golangci-lint; then exit fi -echo Running: golangci-lint -golangci-lint run -v \ No newline at end of file +#echo Running: golangci-lint +## https://github.com/golangci/golangci-lint/issues/2788 +#CGO_ENABLED=0 golangci-lint run -v \ No newline at end of file