mirror of
https://github.com/go-gitea/gitea
synced 2025-08-03 08:08:36 +00:00
Add Node.js build dep, remove built js/css files (#9114)
- Added Node.js as build dependency and removes build files from git. - Added version checks for both Go and Node.js. - Overhauled the js/css make target to only run when needed. - Merged the `generate` make target into `build` as per suggestion. Fixes: https://github.com/go-gitea/gitea/issues/6782 Fixes: https://github.com/go-gitea/gitea/issues/9216
This commit is contained in:
@@ -56,11 +56,10 @@ steps:
|
||||
|
||||
- name: pre-build
|
||||
pull: always
|
||||
image: webhippie/nodejs:latest
|
||||
image: node:10 # this step is kept at the lowest version of node that we support
|
||||
commands:
|
||||
- make css
|
||||
- make js
|
||||
- bash -c '[ -z "$(git status --porcelain public/js public/css)" ] || (echo "Generated js/css files do not match" && git status --porcelain public/js public/css && exit 1)'
|
||||
|
||||
- name: build-without-gcc
|
||||
pull: always
|
||||
@@ -69,6 +68,7 @@ steps:
|
||||
GO111MODULE: on
|
||||
GOPROXY: off
|
||||
commands:
|
||||
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
||||
- go build -mod=vendor -o gitea_no_gcc # test if build succeeds without the sqlite tag
|
||||
|
||||
- name: build-linux-386
|
||||
@@ -80,12 +80,14 @@ steps:
|
||||
GOOS: linux
|
||||
GOARCH: 386
|
||||
commands:
|
||||
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
||||
- go build -mod=vendor -o gitea_linux_386 # test if compatible with 32 bit
|
||||
|
||||
- name: build
|
||||
pull: always
|
||||
image: golang:1.13
|
||||
commands:
|
||||
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
|
||||
- make clean
|
||||
- make generate
|
||||
- make golangci-lint
|
||||
|
Reference in New Issue
Block a user