CI: Fix tag rules
This commit is contained in:
parent
07ca0729fe
commit
6267e0baf8
2 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ pipeline:
|
|||
build:
|
||||
image: debian
|
||||
when:
|
||||
tag: *
|
||||
tag: v*
|
||||
commands:
|
||||
- DEBIAN_FRONTEND=noninteractive apt-get -qq update < /dev/null > /dev/null
|
||||
- DEBIAN_FRONTEND=noninteractive apt-get -y -qq upgrade < /dev/null > /dev/null
|
||||
|
@ -23,7 +23,7 @@ pipeline:
|
|||
publish:
|
||||
image: plugins/gitea-release
|
||||
when:
|
||||
tag: *
|
||||
tag: v*
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea_token
|
||||
|
|
2
build.sh
2
build.sh
|
@ -13,7 +13,7 @@ echo "Fetch git tags..."
|
|||
git fetch --tags
|
||||
|
||||
echo "Detect version using git describe..."
|
||||
VERSION="$( git describe --tags )"
|
||||
VERSION="$( git describe --tags|sed 's/^[^0-9]*//' )"
|
||||
|
||||
echo "Set version=$VERSION in setup.py using sed..."
|
||||
sed -i "s/^version *=.*$/version = '$VERSION'/" setup.py
|
||||
|
|
Loading…
Reference in a new issue