diff --git a/Makefile b/Makefile index 07632d91b..095252ea0 100644 --- a/Makefile +++ b/Makefile @@ -40,8 +40,10 @@ endif ifeq ($(OS), Windows_NT) + GOFLAGS := -v -buildmode=exe EXECUTABLE ?= gitea.exe else + GOFLAGS := -v EXECUTABLE ?= gitea UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) @@ -54,7 +56,6 @@ endif GOFMT ?= gofmt -s -GOFLAGS := -v EXTRA_GOFLAGS ?= MAKE_VERSION := $(shell $(MAKE) -v | head -n 1) @@ -531,7 +532,7 @@ release-windows: | $(DIST_DIRS) @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \ fi - 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) . + 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) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif