summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-06-26 21:47:34 +0200
committerGitHub <noreply@github.com>2020-06-26 22:47:34 +0300
commit772df936716bf998c44b02db876ae43845da092f (patch)
tree156ed89f499ab93a4f0f67a8a02ad602e416fbb3 /Makefile
parent043ed32ab5b9ffa117d4b70a017b5e8261b3e430 (diff)
downloadgitea-772df936716bf998c44b02db876ae43845da092f.tar.gz
gitea-772df936716bf998c44b02db876ae43845da092f.zip
Disable go module when downloading global binaries (#12030)
Prevent `go get` from touching `go.mod` and `go.sum` when executing global binaries during the build process. Once https://github.com/golang/go/issues/30515 is fixed, we should is whatever solution is provided there. Fixes: https://github.com/go-gitea/gitea/pull/12010 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 2b9abc46e0..37af184945 100644
--- a/Makefile
+++ b/Makefile
@@ -253,7 +253,7 @@ swagger-validate:
.PHONY: errcheck
errcheck:
@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) get -u github.com/kisielk/errcheck; \
+ GO111MODULE=off $(GO) get -u github.com/kisielk/errcheck; \
fi
errcheck $(GO_PACKAGES)
@@ -264,14 +264,14 @@ revive:
.PHONY: misspell-check
misspell-check:
@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) get -u github.com/client9/misspell/cmd/misspell; \
+ GO111MODULE=off $(GO) get -u github.com/client9/misspell/cmd/misspell; \
fi
misspell -error -i unknwon,destory $(GO_SOURCES_OWN)
.PHONY: misspell
misspell:
@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) get -u github.com/client9/misspell/cmd/misspell; \
+ GO111MODULE=off $(GO) get -u github.com/client9/misspell/cmd/misspell; \
fi
misspell -w -i unknwon $(GO_SOURCES_OWN)
@@ -529,7 +529,7 @@ $(DIST_DIRS):
.PHONY: release-windows
release-windows: | $(DIST_DIRS)
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) get -u src.techknowlogick.com/xgo; \
+ GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
fi
CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
ifeq ($(CI),drone)
@@ -539,7 +539,7 @@ endif
.PHONY: release-linux
release-linux: | $(DIST_DIRS)
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) get -u src.techknowlogick.com/xgo; \
+ GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
fi
CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/mips64le,linux/mips,linux/mipsle' -out gitea-$(VERSION) .
ifeq ($(CI),drone)
@@ -549,7 +549,7 @@ endif
.PHONY: release-darwin
release-darwin: | $(DIST_DIRS)
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) get -u src.techknowlogick.com/xgo; \
+ GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
fi
CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
ifeq ($(CI),drone)