Fixed building static binaries
This commit is contained in:
parent
a89be187b2
commit
0b49e973dd
|
@ -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:
|
||||||
|
|
18
Makefile
18
Makefile
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue