Skip to content

Commit daaabaa

Browse files
cez81lunny
authored andcommitted
Enforce netgo build tag while cross-compilation (Backport of #1690) (#1731)
1 parent fa059de commit daaabaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ release-windows:
112112
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
113113
go get -u github.com/karalabe/xgo; \
114114
fi
115-
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
115+
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
116116
ifeq ($(CI),drone)
117117
mv /build/* $(DIST)/binaries
118118
endif
@@ -122,7 +122,7 @@ release-linux:
122122
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
123123
go get -u github.com/karalabe/xgo; \
124124
fi
125-
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) .
125+
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) .
126126
ifeq ($(CI),drone)
127127
mv /build/* $(DIST)/binaries
128128
endif
@@ -132,7 +132,7 @@ release-darwin:
132132
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
133133
go get -u github.com/karalabe/xgo; \
134134
fi
135-
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
135+
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
136136
ifeq ($(CI),drone)
137137
mv /build/* $(DIST)/binaries
138138
endif

0 commit comments

Comments
 (0)