diff --git a/.github/workflows/PyNUTClient.yml b/.github/workflows/PyNUTClient.yml index 5e96018bce..29cea51d19 100644 --- a/.github/workflows/PyNUTClient.yml +++ b/.github/workflows/PyNUTClient.yml @@ -42,11 +42,12 @@ jobs: git --version >&2 || true ; TAG_NAME="$(echo $GITHUB_REF | cut -d / -f 3)" ; if [ x"$TAG_NAME" = xmaster ]; then - TAG_NAME="$(git describe --tags --match 'v[0-9]*.[0-9]*.[0-9]' --exclude '*-signed' --exclude '*rc*' --exclude '*alpha*' --exclude '*beta*' 2>/dev/null || git describe --tags --exclude '*rc*' --exclude '*alpha*' --exclude '*beta*' --exclude '*Windows*' --exclude '*IPM*' 2>/dev/null | sed -e 's/^v\([0-9]\)/\1/' -e 's,^.*/,,')" \ + { TAG_NAME="$(git describe --tags --match 'v[0-9]*.[0-9]*.[0-9]' --exclude '*-signed' --exclude '*rc*' --exclude '*alpha*' --exclude '*beta*')" + || TAG_NAME="$(git describe --tags --exclude '*rc*' --exclude '*alpha*' --exclude '*beta*' --exclude '*Windows*' --exclude '*IPM*')" ; } \ && test -n "${TAG_NAME}" \ || TAG_NAME="2.8.1-`TZ=UTC date +%s`" ; fi >&2 ; - TAG_NAME="$(echo "$TAG_NAME" | sed -e 's/^v//' -e 's/-g.*$//' -e 's/-/./g')" ; + TAG_NAME="$(echo "$TAG_NAME" | sed -e 's/^v\([0-9]\)/\1/' -e 's,^.*/,,' -e 's/^v//' -e 's/-g.*$//' -e 's/-/./g')" ; echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT - name: Install pypa/setuptools run: >-