Skip to content

Commit 1648bf2

Browse files
authored
Turn off go modules for xgo and gxz (#10963)
* Turn off go modules for xgo and gxz Signed-off-by: jolheiser <[email protected]> * Add test release for PR Signed-off-by: jolheiser <[email protected]> * Try with go modules off Signed-off-by: jolheiser <[email protected]> * Revert Makefile, force a release test Signed-off-by: jolheiser <[email protected]> * Turn on GOPROXY for release Signed-off-by: jolheiser <[email protected]> * CI Signed-off-by: jolheiser <[email protected]> * CI Signed-off-by: jolheiser <[email protected]> * Final commit Signed-off-by: jolheiser <[email protected]>
1 parent 561e7a9 commit 1648bf2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ steps:
421421
- export PATH=$PATH:$GOPATH/bin
422422
- make release
423423
environment:
424-
GOPROXY: off
424+
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
425425
TAGS: bindata sqlite sqlite_unlock_notify
426426

427427
- name: gpg-sign
@@ -519,7 +519,7 @@ steps:
519519
- export PATH=$PATH:$GOPATH/bin
520520
- make release
521521
environment:
522-
GOPROXY: off
522+
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
523523
TAGS: bindata sqlite sqlite_unlock_notify
524524

525525
- name: gpg-sign

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ release-windows: | $(DIST_DIRS)
497497
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
498498
$(GO) get -u src.techknowlogick.com/xgo; \
499499
fi
500-
xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
500+
GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
501501
ifeq ($(CI),drone)
502502
cp /build/* $(DIST)/binaries
503503
endif
@@ -507,7 +507,7 @@ release-linux: | $(DIST_DIRS)
507507
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
508508
$(GO) get -u src.techknowlogick.com/xgo; \
509509
fi
510-
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) .
510+
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) .
511511
ifeq ($(CI),drone)
512512
cp /build/* $(DIST)/binaries
513513
endif
@@ -517,7 +517,7 @@ release-darwin: | $(DIST_DIRS)
517517
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
518518
$(GO) get -u src.techknowlogick.com/xgo; \
519519
fi
520-
xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
520+
GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
521521
ifeq ($(CI),drone)
522522
cp /build/* $(DIST)/binaries
523523
endif
@@ -533,7 +533,7 @@ release-check: | $(DIST_DIRS)
533533
.PHONY: release-compress
534534
release-compress: | $(DIST_DIRS)
535535
@hash gxz > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
536-
$(GO) get -u github.com/ulikunitz/xz/cmd/gxz; \
536+
GO111MODULE=off $(GO) get -u github.com/ulikunitz/xz/cmd/gxz; \
537537
fi
538538
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done;
539539

0 commit comments

Comments
 (0)