Browse Source

Enforce netgo build tag while cross-compilation (#1690)

for-closed-social
Thomas Boerger 7 years ago
committed by Lunny Xiao
parent
commit
c864ccf9b1
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      Makefile

+ 3
- 3
Makefile View File

@ -140,7 +140,7 @@ release-windows:
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/karalabe/xgo; \ go get -u github.com/karalabe/xgo; \
fi fi
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
ifeq ($(CI),drone) ifeq ($(CI),drone)
mv /build/* $(DIST)/binaries mv /build/* $(DIST)/binaries
endif endif
@ -150,7 +150,7 @@ release-linux:
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/karalabe/xgo; \ go get -u github.com/karalabe/xgo; \
fi fi
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) .
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) .
ifeq ($(CI),drone) ifeq ($(CI),drone)
mv /build/* $(DIST)/binaries mv /build/* $(DIST)/binaries
endif endif
@ -160,7 +160,7 @@ release-darwin:
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/karalabe/xgo; \ go get -u github.com/karalabe/xgo; \
fi fi
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
ifeq ($(CI),drone) ifeq ($(CI),drone)
mv /build/* $(DIST)/binaries mv /build/* $(DIST)/binaries
endif endif

Loading…
Cancel
Save