Check go version when installing govulncheck

govulncheck supports only go 1.18 or greater

Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
This commit is contained in:
Cosmin Cojocar 2022-09-12 14:56:34 +02:00 committed by Cosmin Cojocar
parent 88c23deb88
commit e9b2781247

View file

@ -25,7 +25,9 @@ install-test-deps:
$(GO_NOMOD) get -u github.com/lib/pq
install-govulncheck:
go install golang.org/x/vuln/cmd/govulncheck@latest
@if [ $(GO_MINOR_VERSION) -gt $(GOVULN_MIN_VERSION) ]; then \
go install golang.org/x/vuln/cmd/govulncheck@latest; \
fi
test: install-test-deps build fmt lint sec govulncheck
$(GINKGO) -v --fail-fast