From: techknowlogick Date: Mon, 1 Mar 2021 03:43:55 +0000 (-0500) Subject: use gomod support w/ xgo (#14836) X-Git-Tag: v1.15.0-dev~104 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d801a158c53bcdba75207db9faaace29251203a8;p=gitea.git use gomod support w/ xgo (#14836) --- diff --git a/.drone.yml b/.drone.yml index f64f5e6710..3ad3e15325 100644 --- a/.drone.yml +++ b/.drone.yml @@ -480,6 +480,9 @@ platform: os: linux arch: amd64 +workspace: + path: /source + trigger: branch: - master @@ -574,6 +577,9 @@ platform: os: linux arch: amd64 +workspace: + path: /source + trigger: event: - tag diff --git a/Makefile b/Makefile index 5577597678..527320ee52 100644 --- a/Makefile +++ b/Makefile @@ -574,9 +574,9 @@ $(DIST_DIRS): .PHONY: release-windows release-windows: | $(DIST_DIRS) @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \ + $(GO) install src.techknowlogick.com/xgo@latest; \ fi - CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . + CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif @@ -584,9 +584,9 @@ endif .PHONY: release-linux release-linux: | $(DIST_DIRS) @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \ + $(GO) install src.techknowlogick.com/xgo@latest; \ 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_ARCHS)' -out gitea-$(VERSION) . + CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif @@ -594,9 +594,9 @@ endif .PHONY: release-darwin release-darwin: | $(DIST_DIRS) @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \ + $(GO) install src.techknowlogick.com/xgo@latest; \ fi - CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64' -out gitea-$(VERSION) . + CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64' -out gitea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif