Skip to content

Commit 125ffb8

Browse files
go1.15 on windows (#12589)
* go1.15 on windows * update xgo to use node14
1 parent 4b97f90 commit 125ffb8

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

.drone.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -447,23 +447,13 @@ steps:
447447
commands:
448448
- git fetch --tags --force
449449

450-
- name: static-windows
451-
pull: always
452-
image: techknowlogick/xgo:go-1.14.x
453-
commands:
454-
- apt update && apt -y install curl
455-
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
456-
- export PATH=$PATH:$GOPATH/bin
457-
- make frontend generate release-windows
458-
environment:
459-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
460-
TAGS: bindata sqlite sqlite_unlock_notify
461-
462450
- name: static
463451
pull: always
464452
image: techknowlogick/xgo:go-1.15.x
465453
commands:
466-
- make release-linux release-darwin release-copy release-compress release-sources release-docs release-check
454+
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs
455+
- export PATH=$PATH:$GOPATH/bin
456+
- make release
467457
environment:
468458
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
469459
TAGS: bindata sqlite sqlite_unlock_notify
@@ -558,8 +548,7 @@ steps:
558548
pull: always
559549
image: techknowlogick/xgo:go-1.15.x
560550
commands:
561-
- apt update && apt -y install curl
562-
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
551+
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs
563552
- export PATH=$PATH:$GOPATH/bin
564553
- make release
565554
environment:

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ ifeq ($(HAS_GO), GO)
4242
endif
4343

4444
ifeq ($(OS), Windows_NT)
45+
GOFLAGS := -v -buildmode=exe
4546
EXECUTABLE ?= gitea.exe
4647
else
48+
GOFLAGS := -v
4749
EXECUTABLE ?= gitea
4850
endif
4951

@@ -55,7 +57,6 @@ endif
5557

5658
GOFMT ?= gofmt -s
5759

58-
GOFLAGS := -v
5960
EXTRA_GOFLAGS ?=
6061

6162
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
@@ -556,7 +557,7 @@ release-windows: | $(DIST_DIRS)
556557
GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
557558
fi
558559
@echo "Warning: windows version is built using golang 1.14"
559-
CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go go-1.14.x -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
560+
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) .
560561
ifeq ($(CI),drone)
561562
cp /build/* $(DIST)/binaries
562563
endif

0 commit comments

Comments
 (0)