From 0b49e973ddb7d10d0de74acdb09d5d27c588d46f Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 27 Apr 2019 11:07:55 +0200 Subject: [PATCH] Fixed building static binaries --- .drone.yml | 4 ++-- Makefile | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4e64fd2..87bdc90 100644 --- a/.drone.yml +++ b/.drone.yml @@ -58,7 +58,7 @@ steps: - make release # Push the releases to our pseudo-s3-bucket - - name: release-latest + - name: release image: plugins/s3:1 pull: true settings: @@ -103,7 +103,7 @@ steps: - make release # Push the releases to our pseudo-s3-bucket - - name: release-latest + - name: release image: plugins/s3:1 pull: true settings: diff --git a/Makefile b/Makefile index 9b904bb..f0b8cd2 100644 --- a/Makefile +++ b/Makefile @@ -100,30 +100,30 @@ release-dirs: .PHONY: release-windows release-windows: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - go install $(GOFLAGS) github.com/karalabe/xgo; \ + go install $(GOFLAGS) src.techknowlogick.com/xgo; \ fi - xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-w -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out sofa-$(VERSION) . -ifeq ($(CI),drone) + xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out vikunja-$(VERSION) . +ifneq ($(DRONE_WORKSPACE),'') mv /build/* $(DIST)/binaries endif .PHONY: release-linux release-linux: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - go install $(GOFLAGS) github.com/karalabe/xgo; \ + go install $(GOFLAGS) src.techknowlogick.com/xgo; \ fi - xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-w -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out sofa-$(VERSION) . -ifeq ($(CI),drone) + xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out vikunja-$(VERSION) . +ifneq ($(DRONE_WORKSPACE),'') mv /build/* $(DIST)/binaries endif .PHONY: release-darwin release-darwin: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - go install $(GOFLAGS) github.com/karalabe/xgo; \ + go install $(GOFLAGS) src.techknowlogick.com/xgo; \ fi - xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out sofa-$(VERSION) . -ifeq ($(CI),drone) + xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out vikunja-$(VERSION) . +ifneq ($(DRONE_WORKSPACE),'') mv /build/* $(DIST)/binaries endif