Fixed building static binaries

This commit is contained in:
konrad 2019-04-27 11:07:55 +02:00
parent a89be187b2
commit 0b49e973dd
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 11 additions and 11 deletions

View File

@ -58,7 +58,7 @@ steps:
- make release - make release
# Push the releases to our pseudo-s3-bucket # Push the releases to our pseudo-s3-bucket
- name: release-latest - name: release
image: plugins/s3:1 image: plugins/s3:1
pull: true pull: true
settings: settings:
@ -103,7 +103,7 @@ steps:
- make release - make release
# Push the releases to our pseudo-s3-bucket # Push the releases to our pseudo-s3-bucket
- name: release-latest - name: release
image: plugins/s3:1 image: plugins/s3:1
pull: true pull: true
settings: settings:

View File

@ -100,30 +100,30 @@ release-dirs:
.PHONY: release-windows .PHONY: release-windows
release-windows: release-windows:
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @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 fi
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-w -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out sofa-$(VERSION) . xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out vikunja-$(VERSION) .
ifeq ($(CI),drone) ifneq ($(DRONE_WORKSPACE),'')
mv /build/* $(DIST)/binaries mv /build/* $(DIST)/binaries
endif endif
.PHONY: release-linux .PHONY: release-linux
release-linux: release-linux:
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @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 fi
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-w -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out sofa-$(VERSION) . xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out vikunja-$(VERSION) .
ifeq ($(CI),drone) ifneq ($(DRONE_WORKSPACE),'')
mv /build/* $(DIST)/binaries mv /build/* $(DIST)/binaries
endif endif
.PHONY: release-darwin .PHONY: release-darwin
release-darwin: release-darwin:
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @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 fi
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out sofa-$(VERSION) . xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out vikunja-$(VERSION) .
ifeq ($(CI),drone) ifneq ($(DRONE_WORKSPACE),'')
mv /build/* $(DIST)/binaries mv /build/* $(DIST)/binaries
endif endif