go1.15 on windows (#12589)
* go1.15 on windows * update xgo to use node14
This commit is contained in:
parent
4b97f9018b
commit
125ffb87f0
19
.drone.yml
19
.drone.yml
|
@ -447,23 +447,13 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: static-windows
|
|
||||||
pull: always
|
|
||||||
image: techknowlogick/xgo:go-1.14.x
|
|
||||||
commands:
|
|
||||||
- apt update && apt -y install curl
|
|
||||||
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
|
||||||
- export PATH=$PATH:$GOPATH/bin
|
|
||||||
- make frontend generate release-windows
|
|
||||||
environment:
|
|
||||||
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
|
|
||||||
TAGS: bindata sqlite sqlite_unlock_notify
|
|
||||||
|
|
||||||
- name: static
|
- name: static
|
||||||
pull: always
|
pull: always
|
||||||
image: techknowlogick/xgo:go-1.15.x
|
image: techknowlogick/xgo:go-1.15.x
|
||||||
commands:
|
commands:
|
||||||
- make release-linux release-darwin release-copy release-compress release-sources release-docs release-check
|
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs
|
||||||
|
- export PATH=$PATH:$GOPATH/bin
|
||||||
|
- make release
|
||||||
environment:
|
environment:
|
||||||
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
|
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
|
||||||
TAGS: bindata sqlite sqlite_unlock_notify
|
TAGS: bindata sqlite sqlite_unlock_notify
|
||||||
|
@ -558,8 +548,7 @@ steps:
|
||||||
pull: always
|
pull: always
|
||||||
image: techknowlogick/xgo:go-1.15.x
|
image: techknowlogick/xgo:go-1.15.x
|
||||||
commands:
|
commands:
|
||||||
- apt update && apt -y install curl
|
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs
|
||||||
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
|
||||||
- export PATH=$PATH:$GOPATH/bin
|
- export PATH=$PATH:$GOPATH/bin
|
||||||
- make release
|
- make release
|
||||||
environment:
|
environment:
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -42,8 +42,10 @@ ifeq ($(HAS_GO), GO)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(OS), Windows_NT)
|
||||||
|
GOFLAGS := -v -buildmode=exe
|
||||||
EXECUTABLE ?= gitea.exe
|
EXECUTABLE ?= gitea.exe
|
||||||
else
|
else
|
||||||
|
GOFLAGS := -v
|
||||||
EXECUTABLE ?= gitea
|
EXECUTABLE ?= gitea
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -55,7 +57,6 @@ endif
|
||||||
|
|
||||||
GOFMT ?= gofmt -s
|
GOFMT ?= gofmt -s
|
||||||
|
|
||||||
GOFLAGS := -v
|
|
||||||
EXTRA_GOFLAGS ?=
|
EXTRA_GOFLAGS ?=
|
||||||
|
|
||||||
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
|
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
|
||||||
|
@ -556,7 +557,7 @@ release-windows: | $(DIST_DIRS)
|
||||||
GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
|
GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
|
||||||
fi
|
fi
|
||||||
@echo "Warning: windows version is built using golang 1.14"
|
@echo "Warning: windows version is built using golang 1.14"
|
||||||
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) .
|
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)
|
ifeq ($(CI),drone)
|
||||||
cp /build/* $(DIST)/binaries
|
cp /build/* $(DIST)/binaries
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue