forked from Shiloh/githaven
Combine Drone release steps (#9338)
* Combine Drone release steps Fixes missing JS/CSS because drone did unwanted parallelization of the js/css task and the generate task. Combined the tasks into one and made 'make release' work standalone. Fixes: https://github.com/go-gitea/gitea/issues/9324 Fixes: https://github.com/go-gitea/gitea/issues/9362 * move js/css to generate dependencies * remove unneccessary go-all target * remove go target as well
This commit is contained in:
parent
60b31c8f01
commit
7217b703e9
30
.drone.yml
30
.drone.yml
@ -388,17 +388,12 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: build
|
|
||||||
pull: always
|
|
||||||
image: node:10 # this step is kept at the lowest version of node that we support
|
|
||||||
commands:
|
|
||||||
- make css
|
|
||||||
- make js
|
|
||||||
|
|
||||||
- name: static
|
- name: static
|
||||||
pull: always
|
pull: always
|
||||||
image: techknowlogick/xgo:latest
|
image: techknowlogick/xgo:latest
|
||||||
commands:
|
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
|
- export PATH=$PATH:$GOPATH/bin
|
||||||
- make release
|
- make release
|
||||||
environment:
|
environment:
|
||||||
@ -419,8 +414,6 @@ steps:
|
|||||||
from_secret: gpgsign_key
|
from_secret: gpgsign_key
|
||||||
GPGSIGN_PASSPHRASE:
|
GPGSIGN_PASSPHRASE:
|
||||||
from_secret: gpgsign_passphrase
|
from_secret: gpgsign_passphrase
|
||||||
depends_on:
|
|
||||||
- static
|
|
||||||
|
|
||||||
- name: release-branch-release
|
- name: release-branch-release
|
||||||
pull: always
|
pull: always
|
||||||
@ -438,8 +431,6 @@ steps:
|
|||||||
from_secret: aws_access_key_id
|
from_secret: aws_access_key_id
|
||||||
AWS_SECRET_ACCESS_KEY:
|
AWS_SECRET_ACCESS_KEY:
|
||||||
from_secret: aws_secret_access_key
|
from_secret: aws_secret_access_key
|
||||||
depends_on:
|
|
||||||
- gpg-sign
|
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- "release/*"
|
- "release/*"
|
||||||
@ -462,8 +453,6 @@ steps:
|
|||||||
from_secret: aws_access_key_id
|
from_secret: aws_access_key_id
|
||||||
AWS_SECRET_ACCESS_KEY:
|
AWS_SECRET_ACCESS_KEY:
|
||||||
from_secret: aws_secret_access_key
|
from_secret: aws_secret_access_key
|
||||||
depends_on:
|
|
||||||
- gpg-sign
|
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
@ -496,17 +485,12 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: build
|
|
||||||
pull: always
|
|
||||||
image: node:10 # this step is kept at the lowest version of node that we support
|
|
||||||
commands:
|
|
||||||
- make css
|
|
||||||
- make js
|
|
||||||
|
|
||||||
- name: static
|
- name: static
|
||||||
pull: always
|
pull: always
|
||||||
image: techknowlogick/xgo:latest
|
image: techknowlogick/xgo:latest
|
||||||
commands:
|
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
|
- export PATH=$PATH:$GOPATH/bin
|
||||||
- make release
|
- make release
|
||||||
environment:
|
environment:
|
||||||
@ -527,8 +511,6 @@ steps:
|
|||||||
from_secret: gpgsign_key
|
from_secret: gpgsign_key
|
||||||
GPGSIGN_PASSPHRASE:
|
GPGSIGN_PASSPHRASE:
|
||||||
from_secret: gpgsign_passphrase
|
from_secret: gpgsign_passphrase
|
||||||
depends_on:
|
|
||||||
- static
|
|
||||||
|
|
||||||
- name: release
|
- name: release
|
||||||
pull: always
|
pull: always
|
||||||
@ -546,8 +528,6 @@ steps:
|
|||||||
from_secret: aws_access_key_id
|
from_secret: aws_access_key_id
|
||||||
AWS_SECRET_ACCESS_KEY:
|
AWS_SECRET_ACCESS_KEY:
|
||||||
from_secret: aws_secret_access_key
|
from_secret: aws_secret_access_key
|
||||||
depends_on:
|
|
||||||
- gpg-sign
|
|
||||||
|
|
||||||
- name: github
|
- name: github
|
||||||
pull: always
|
pull: always
|
||||||
@ -558,8 +538,6 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
depends_on:
|
|
||||||
- gpg-sign
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
10
Makefile
10
Makefile
@ -128,7 +128,7 @@ vet:
|
|||||||
$(GO) vet $(PACKAGES)
|
$(GO) vet $(PACKAGES)
|
||||||
|
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
generate:
|
generate: js css
|
||||||
GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
|
GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
|
||||||
|
|
||||||
.PHONY: generate-swagger
|
.PHONY: generate-swagger
|
||||||
@ -384,14 +384,8 @@ check: test
|
|||||||
install: $(wildcard *.go)
|
install: $(wildcard *.go)
|
||||||
$(GO) install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
|
$(GO) install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
|
||||||
|
|
||||||
.PHONY: go
|
|
||||||
go: go-check $(EXECUTABLE)
|
|
||||||
|
|
||||||
.PHONY: go-all
|
|
||||||
go-all: go-check generate go
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: js css go-all
|
build: go-check generate $(EXECUTABLE)
|
||||||
|
|
||||||
$(EXECUTABLE): $(GO_SOURCES)
|
$(EXECUTABLE): $(GO_SOURCES)
|
||||||
GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
|
GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
|
||||||
|
Loading…
Reference in New Issue
Block a user