mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 12:52:23 +00:00
csi-kata-directvolume: Remove go version check
The driver build recipe has a script to check the current Go version against the go.mod version. However, the script is broken ($expected is unbound) and I don't believe we do this for other components. On top of this, Go should be backward-compatible. Let's keep things simple for now and we can evaluate restoring this script in the future if need be. Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
This commit is contained in:
parent
fb87bf221f
commit
fe55b29ef0
@ -56,7 +56,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
|
|||||||
# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables
|
# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables
|
||||||
# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below.
|
# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below.
|
||||||
|
|
||||||
build-%: check-go-version-go
|
build-%:
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
CGO_ENABLED=0 GOOS=linux go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$*
|
CGO_ENABLED=0 GOOS=linux go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$*
|
||||||
if [ "$$ARCH" = "amd64" ]; then \
|
if [ "$$ARCH" = "amd64" ]; then \
|
||||||
@ -92,9 +92,6 @@ push: $(CMDS:%=push-%)
|
|||||||
clean:
|
clean:
|
||||||
-rm -rf bin
|
-rm -rf bin
|
||||||
|
|
||||||
test: check-go-version-go
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test-vet
|
.PHONY: test-vet
|
||||||
test: test-vet
|
test: test-vet
|
||||||
test-vet:
|
test-vet:
|
||||||
@ -111,12 +108,3 @@ test-fmt:
|
|||||||
gofmt -d $$files; \
|
gofmt -d $$files; \
|
||||||
false; \
|
false; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Targets in the makefile can depend on check-go-version-<path to go binary>
|
|
||||||
# to trigger a warning if the x.y version of that binary does not match
|
|
||||||
# what the project uses. Make ensures that this is only checked once per
|
|
||||||
# invocation.
|
|
||||||
.PHONY: check-go-version-%
|
|
||||||
check-go-version-%:
|
|
||||||
./release-tools/verify-go-version.sh "$*"
|
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Copyright 2019 The Kubernetes Authors.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
GO="$1"
|
|
||||||
|
|
||||||
if [ ! "$GO" ]; then
|
|
||||||
echo >&2 "usage: $0 <path to go binary>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
die () {
|
|
||||||
echo "ERROR: $*"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
version=$("$GO" version) || die "determining version of $GO failed"
|
|
||||||
# shellcheck disable=SC2001
|
|
||||||
majorminor=$(echo "$version" | sed -e 's/.*go\([0-9]*\)\.\([0-9]*\).*/\1.\2/')
|
|
||||||
|
|
||||||
if [ "$majorminor" != "$expected" ]; then
|
|
||||||
cat >&2 <<EOF
|
|
||||||
|
|
||||||
======================================================
|
|
||||||
WARNING
|
|
||||||
|
|
||||||
Compile the Project with Go version v$majorminor !
|
|
||||||
|
|
||||||
======================================================
|
|
||||||
|
|
||||||
EOF
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user