Skip to content

Commit c864ccf

Browse files
tboergerlunny
authored andcommitted
Enforce netgo build tag while cross-compilation (#1690)
1 parent 930d175 commit c864ccf

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
@@ -140,7 +140,7 @@ release-windows:
140140
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
141141
go get -u github.com/karalabe/xgo; \
142142
fi
143-
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
143+
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
144144
ifeq ($(CI),drone)
145145
mv /build/* $(DIST)/binaries
146146
endif
@@ -150,7 +150,7 @@ release-linux:
150150
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
151151
go get -u github.com/karalabe/xgo; \
152152
fi
153-
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) .
153+
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) .
154154
ifeq ($(CI),drone)
155155
mv /build/* $(DIST)/binaries
156156
endif
@@ -160,7 +160,7 @@ release-darwin:
160160
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
161161
go get -u github.com/karalabe/xgo; \
162162
fi
163-
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
163+
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
164164
ifeq ($(CI),drone)
165165
mv /build/* $(DIST)/binaries
166166
endif

0 commit comments

Comments
 (0)