From 6267e0baf816f996af75bea33e4e5f69817ab961 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 27 Apr 2022 20:24:23 +0200 Subject: [PATCH] CI: Fix tag rules --- .woodpecker.yml | 4 ++-- build.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2d3bac9..0397e5a 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -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 diff --git a/build.sh b/build.sh index a2c070e..6404c78 100755 --- a/build.sh +++ b/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