From e1544864db06d425d4af6d6380f454fd5656ebd9 Mon Sep 17 00:00:00 2001 From: Bartosz Leper Date: Thu, 24 Oct 2024 17:04:27 +0200 Subject: [PATCH 1/2] Use GOWORK=off in certain targets to prevent missing package errors --- integrations/terraform/Makefile | 3 ++- version.mk | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/integrations/terraform/Makefile b/integrations/terraform/Makefile index e43b5adc53a9e..e0f7a3433abb6 100644 --- a/integrations/terraform/Makefile +++ b/integrations/terraform/Makefile @@ -29,7 +29,8 @@ clean: tfclean .PHONY: build build: clean - GOOS=$(OS) GOARCH=$(ARCH) $(CGOFLAG) go build -o $(BUILDDIR)/terraform-provider-teleport $(BUILDFLAGS) +# Turning off GOWORK to prevent missing package errors. + GOWORK=off GOOS=$(OS) GOARCH=$(ARCH) $(CGOFLAG) go build -o $(BUILDDIR)/terraform-provider-teleport $(BUILDFLAGS) build-darwin-universal: $(addprefix $(BUILDDIR)/terraform-provider-teleport_,arm64 amd64) lipo -create -output $(BUILDDIR)/terraform-provider-teleport $^ diff --git a/version.mk b/version.mk index 642813aa0118f..ba190a186f822 100644 --- a/version.mk +++ b/version.mk @@ -43,4 +43,5 @@ tsh-version: .PHONY:validate-semver validate-semver: - cd build.assets/tooling && CGO_ENABLED=0 go run ./cmd/check -check valid -tag v$(VERSION) +# Turning off GOWORK to prevent missing package errors. + GOWORK=off CGO_ENABLED=0 go -C build.assets/tooling run ./cmd/check -check valid -tag v$(VERSION) From 65125948d998f13ff6f4c391c8d4046936a0b3e1 Mon Sep 17 00:00:00 2001 From: Bartosz Leper Date: Fri, 25 Oct 2024 07:44:45 +0200 Subject: [PATCH 2/2] Review --- integrations/terraform/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integrations/terraform/Makefile b/integrations/terraform/Makefile index e0f7a3433abb6..f14246132fd55 100644 --- a/integrations/terraform/Makefile +++ b/integrations/terraform/Makefile @@ -196,4 +196,5 @@ $(LOCALBIN): bin/tfplugindocs: go.mod $(LOCALBIN) mkdir -p bin - GOBIN=$(LOCALBIN) go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs +# Turning off GOWORK to prevent missing package errors. + GOWORK=off GOBIN=$(LOCALBIN) go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs