Skip to content

Commit 6743f8a

Browse files
go1.15 on windows (#12589)
We don't support go1.15 on 1.12.x branch, however this will allow users who chose to build with go1.15 on windows to be sucessful
1 parent 4a548a0 commit 6743f8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ endif
4040

4141

4242
ifeq ($(OS), Windows_NT)
43+
GOFLAGS := -v -buildmode=exe
4344
EXECUTABLE ?= gitea.exe
4445
else
46+
GOFLAGS := -v
4547
EXECUTABLE ?= gitea
4648
UNAME_S := $(shell uname -s)
4749
ifeq ($(UNAME_S),Darwin)
@@ -54,7 +56,6 @@ endif
5456

5557
GOFMT ?= gofmt -s
5658

57-
GOFLAGS := -v
5859
EXTRA_GOFLAGS ?=
5960

6061
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
@@ -531,7 +532,7 @@ release-windows: | $(DIST_DIRS)
531532
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
532533
GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
533534
fi
534-
CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
535+
CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
535536
ifeq ($(CI),drone)
536537
cp /build/* $(DIST)/binaries
537538
endif

0 commit comments

Comments
 (0)