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).
This commit is contained in:
Oliver Gugger 2023-02-23 11:09:35 +01:00
parent 0dcecdf362
commit 995b136149
No known key found for this signature in database
GPG key ID: 8E4256593F177720
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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