From 995b136149cbf908451395dcce866120e8161405 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 23 Feb 2023 11:09:35 +0100 Subject: [PATCH] make+tools: don't compile with build tag to avoid collision It looks like one of the projects pulled in by the linter also uses the "tools" build tag. When we turn on that build tag, we get build errors in github.com/ryancurrah/gomodguard. So we just remove the build tag during compilation as it's not actually needed (the build tag is just there to not pull in the dependencies during the normal build). --- Makefile | 4 ++-- tools/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index dc9bdd8..46508c3 100644 --- a/Makefile +++ b/Makefile @@ -56,11 +56,11 @@ all: scratch check install $(GOIMPORTS_BIN): @$(call print, "Installing goimports.") - cd $(TOOLS_DIR); go install -trimpath -tags=tools $(GOIMPORTS_PKG) + cd $(TOOLS_DIR); go install -trimpath $(GOIMPORTS_PKG) $(GOACC_BIN): @$(call print, "Fetching go-acc") - cd $(TOOLS_DIR); go install -trimpath -tags=tools $(GOACC_PKG) + cd $(TOOLS_DIR); go install -trimpath $(GOACC_PKG) # ============ # INSTALLATION diff --git a/tools/Dockerfile b/tools/Dockerfile index 13fc9fd..48c84eb 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -11,7 +11,7 @@ RUN cd /tmp \ && mkdir -p /tmp/build/.cache \ && mkdir -p /tmp/build/.modcache \ && cd /tmp/tools \ - && go install -trimpath -tags=tools github.com/golangci/golangci-lint/cmd/golangci-lint \ + && go install -trimpath github.com/golangci/golangci-lint/cmd/golangci-lint \ && chmod -R 777 /tmp/build/ WORKDIR /build