ci(build): add version number on build
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Simon Vieille 2023-01-03 22:30:23 +01:00
parent ca5f84d1be
commit 534c4f83ad
Signed by: deblan
GPG key ID: 579388D585F70417
2 changed files with 3 additions and 3 deletions

View file

@ -2,6 +2,8 @@ pipeline:
tests:
image: golang:1.18
commands:
- test -n "$CI_COMMIT_TAG" && sed "s/{app_version}/$CI_COMMIT_TAG/g" -i main.go || true
- test -n "$CI_COMMIT_SHA" && sed "s/{app_version}/${CI_COMMIT_TAG:0:7}/g" -i main.go || true
- make test
build_push_latest_gitnet:
@ -16,7 +18,6 @@ pipeline:
password:
from_secret: registry_password
when:
branch: [master, develop, feature/*]
event: [push]
build_push_tag_gitnet:
@ -44,7 +45,6 @@ pipeline:
password:
from_secret: registry_docker_password
when:
branch: [master]
event: [push]
build_push_tag_dhub:

View file

@ -22,7 +22,7 @@ func main() {
app.Name = "email plugin"
app.Usage = "email plugin"
app.Action = run
app.Version = "2.0.2"
app.Version = "{app_version}"
app.Flags = []cli.Flag{
// Plugin environment
cli.StringFlag{