From ab791f3224c20ee779373aaab2c7b91146bf3752 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 17 Apr 2024 14:17:44 -0400 Subject: [PATCH] Makefile: set GOTOOLCHAIN=local Set GOTOOLCHAIN=local for all make targets, and for renovate. Have the "vendor" target (and by extension, "vendor-in-container", which our validation in CI uses) clear any "toolchain" directive that might have been added to go.mod through manual invocations of the compiler. Signed-off-by: Nalin Dahyabhai --- .github/renovate.json5 | 3 +++ Makefile | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 2ff3e70465d..7ef7efe8ca8 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -56,4 +56,7 @@ "**/tests/**" ], + "env": { + "GOTOOLCHAIN": "local" + } } diff --git a/Makefile b/Makefile index acda49ef7d7..92bcbed57df 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ export GOPROXY=https://proxy.golang.org +export GOTOOLCHAIN=local APPARMORTAG := $(shell hack/apparmor_tag.sh) STORAGETAGS := exclude_graphdriver_devicemapper $(shell ./btrfs_tag.sh) $(shell ./btrfs_installed_tag.sh) $(shell ./hack/libsubid_tag.sh) @@ -209,6 +210,7 @@ vendor-in-container: .PHONY: vendor vendor: + if test -n $(strip $(shell go env GOTOOLCHAIN)); then go mod edit -toolchain none ; fi GO111MODULE=on $(GO) mod tidy GO111MODULE=on $(GO) mod vendor GO111MODULE=on $(GO) mod verify