From 47086a726aabf511b73d84417edb388ba7ecffdb Mon Sep 17 00:00:00 2001 From: Matti R Date: Sun, 8 Dec 2019 14:51:34 -0500 Subject: [PATCH 1/4] prebuild CSS/JS before xgo release binaries --- .drone.yml | 36 ++++++++++++++++++++++++++++++++++-- Makefile | 4 ++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 95811c0224f81..d7b11ae4e542f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -388,6 +388,24 @@ steps: commands: - git fetch --tags --force + - name: pre-build + pull: always + image: node:10 # this step is kept at the lowest version of node that we support + commands: + + - name: build + pull: always + image: golang:1.13 + commands: + - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs + - make css + - make js + - make generate + environment: + GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not + GOSUMDB: sum.golang.org + TAGS: bindata sqlite sqlite_unlock_notify + - name: static pull: always image: techknowlogick/xgo:latest @@ -489,6 +507,19 @@ steps: commands: - git fetch --tags --force + - name: build + pull: always + image: golang:1.13 + commands: + - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs + - make css + - make js + - make generate + environment: + GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not + GOSUMDB: sum.golang.org + TAGS: bindata sqlite sqlite_unlock_notify + - name: static pull: always image: techknowlogick/xgo:latest @@ -647,8 +678,6 @@ steps: exclude: - pull_request - - --- kind: pipeline name: docker-linux-arm64 @@ -754,6 +783,9 @@ workspace: base: /go path: src/code.gitea.io/gitea +clone: + disable: true + when: status: - success diff --git a/Makefile b/Makefile index 3ee38f806cc52..a2c0c3bbcbede 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -DIST := dist +reDIST := dist IMPORT := code.gitea.io/gitea export GO111MODULE=off @@ -397,7 +397,7 @@ $(EXECUTABLE): $(GO_SOURCES) GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ .PHONY: release -release: js css generate release-dirs release-windows release-linux release-darwin release-copy release-compress release-check +release: release-dirs release-windows release-linux release-darwin release-copy release-compress release-check .PHONY: release-dirs release-dirs: From 346ad24086715f9f0ede1d31316c1298f88dc535 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Sun, 8 Dec 2019 14:52:58 -0500 Subject: [PATCH 2/4] Update .drone.yml --- .drone.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index d7b11ae4e542f..0f49a2181ae59 100644 --- a/.drone.yml +++ b/.drone.yml @@ -388,11 +388,6 @@ steps: commands: - git fetch --tags --force - - name: pre-build - pull: always - image: node:10 # this step is kept at the lowest version of node that we support - commands: - - name: build pull: always image: golang:1.13 From 3f86d9fb6e0613810f5874ccea738318aa0c7812 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Sun, 8 Dec 2019 14:53:17 -0500 Subject: [PATCH 3/4] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a2c0c3bbcbede..ffb19dab387c1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -reDIST := dist +DIST := dist IMPORT := code.gitea.io/gitea export GO111MODULE=off From e485518f5870ad91f2a4ca9a49f70aa8dba0e8cb Mon Sep 17 00:00:00 2001 From: Matti R Date: Sun, 8 Dec 2019 15:14:54 -0500 Subject: [PATCH 4/4] update per @lafriks feedback --- .drone.yml | 16 ++-------------- Makefile | 2 +- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0f49a2181ae59..b44bcb87256f2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -390,16 +390,10 @@ steps: - name: build pull: always - image: golang:1.13 + image: node:10 # this step is kept at the lowest version of node that we support commands: - - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs - make css - make js - - make generate - environment: - GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not - GOSUMDB: sum.golang.org - TAGS: bindata sqlite sqlite_unlock_notify - name: static pull: always @@ -504,16 +498,10 @@ steps: - name: build pull: always - image: golang:1.13 + image: node:10 # this step is kept at the lowest version of node that we support commands: - - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs - make css - make js - - make generate - environment: - GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not - GOSUMDB: sum.golang.org - TAGS: bindata sqlite sqlite_unlock_notify - name: static pull: always diff --git a/Makefile b/Makefile index ffb19dab387c1..d217405fbf377 100644 --- a/Makefile +++ b/Makefile @@ -397,7 +397,7 @@ $(EXECUTABLE): $(GO_SOURCES) GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ .PHONY: release -release: release-dirs release-windows release-linux release-darwin release-copy release-compress release-check +release: generate release-dirs release-windows release-linux release-darwin release-copy release-compress release-check .PHONY: release-dirs release-dirs: