From edb93f6fde27a77aaff1e229f6433f8a165f826e Mon Sep 17 00:00:00 2001 From: "jose.vazquez" Date: Mon, 30 Sep 2024 19:05:03 +0200 Subject: [PATCH] Try fix licenses check --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9e52e3d405..5900d64700 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,7 @@ ATLAS_KEY_SECRET_NAME = mongodb-atlas-operator-api-key BASE_GO_PACKAGE = github.com/mongodb/mongodb-atlas-kubernetes/v2 GO_LICENSES = go-licenses +GO_LICENSES_VERSION = 1.6.0 KUSTOMIZE = kustomize DISALLOWED_LICENSES = restricted,reciprocal @@ -145,8 +146,10 @@ licenses-up-to-date: ## Check if the licenses.csv is up to date check-licenses: licenses-up-to-date ## Check licenses are compliant with our restrictions @echo "Checking licenses not to be: $(DISALLOWED_LICENSES)" @echo "============================================" - # https://github.com/google/go-licenses/issues/244 - GOTOOLCHAIN=local GOOS=linux GOARCH=amd64 $(GO_LICENSES) check --include_tests \ + go get github.com/google/go-licenses@v1.6.0 + export GOOS=linux + export GOARCH=amd64 + $(go env GOROOT)/bin/go run github.com/google/$(GO_LICENSES)@v$(GO_LICENSES_VERSION) check --include_tests \ --disallowed_types $(DISALLOWED_LICENSES) $(BASE_GO_PACKAGE)/... @echo "--------------------" @echo "Licenses check: PASS"