From 81fa4e78ff2b5032b378cae7b90b74957577d429 Mon Sep 17 00:00:00 2001 From: 6543 <6543@noreply.gitea.io> Date: Mon, 6 Apr 2020 14:21:36 +0000 Subject: [PATCH] Fix CI: Turn off go modules for xgo and gxz (#115) Turn off go modules for xgo and gxz as on https://github.com/go-gitea/gitea/pull/10963 Revert "Fix CI: workaround from @kolaente (#113)" This reverts commit b37673c9540c478e9d07d38e230b57bea463b1c8. Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/115 Reviewed-by: techknowlogick Reviewed-by: John Olheiser --- .drone.yml | 3 --- Makefile | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index b91ef4f..76221d2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -74,9 +74,6 @@ steps: image: techknowlogick/xgo:latest environment: GOPROXY: https://goproxy.cn - # This path does not exist. However, when we set the gopath to /go, the build fails. Not sure why. - # Leaving this here until we know how to resolve this properly. - GOPATH: /srv/app commands: - export PATH=$PATH:$GOPATH/bin - make release diff --git a/Makefile b/Makefile index e970cdf..6b6d85e 100644 --- a/Makefile +++ b/Makefile @@ -147,7 +147,7 @@ release-windows: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ cd /tmp && $(GO) get -u src.techknowlogick.com/xgo; \ fi - xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out tea-$(VERSION) . + GO111MODULE=off xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out tea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif @@ -157,7 +157,7 @@ release-linux: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ cd /tmp && $(GO) get -u src.techknowlogick.com/xgo; \ fi - xgo -dest $(DIST)/binaries -tags 'netgo $(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 tea-$(VERSION) . + GO111MODULE=off xgo -dest $(DIST)/binaries -tags 'netgo $(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 tea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif @@ -167,7 +167,7 @@ release-darwin: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ cd /tmp && $(GO) get -u src.techknowlogick.com/xgo; \ fi - xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out tea-$(VERSION) . + GO111MODULE=off xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out tea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif @@ -179,7 +179,7 @@ release-copy: .PHONY: release-compress release-compress: @hash gxz > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - cd /tmp && $(GO) get -u github.com/ulikunitz/xz/cmd/gxz; \ + GO111MODULE=off $(GO) get -u github.com/ulikunitz/xz/cmd/gxz; \ fi cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done;