]> source.dussan.org Git - gitea.git/commitdiff
Enforce netgo build tag while cross-compilation (#1690)
authorThomas Boerger <thomas@webhippie.de>
Sun, 7 May 2017 14:06:30 +0000 (16:06 +0200)
committerLunny Xiao <xiaolunwen@gmail.com>
Sun, 7 May 2017 14:06:30 +0000 (22:06 +0800)
Makefile

index 275e9619540d970b8e9912c0c3a1858363292023..d078b8784232034f45a9d974a52d2f7610cf502c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -140,7 +140,7 @@ release-windows:
        @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
                go get -u github.com/karalabe/xgo; \
        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)
        mv /build/* $(DIST)/binaries
 endif
@@ -150,7 +150,7 @@ release-linux:
        @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
                go get -u github.com/karalabe/xgo; \
        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)
        mv /build/* $(DIST)/binaries
 endif
@@ -160,7 +160,7 @@ release-darwin:
        @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
                go get -u github.com/karalabe/xgo; \
        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)
        mv /build/* $(DIST)/binaries
 endif