Fix regex breaking on multi-digit version numbers (#350)

Resolves issue with rc version number not having leading zeroes stripped
This commit is contained in:
GeckoEidechse 2022-10-18 02:05:48 +02:00 committed by GitHub
parent bfd587df40
commit f015f27561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ jobs:
- name: Setup environment variables
run: |
# Strip leading `v` and if exists replace `-rc` with `0` and strip leading zeroes from last semver digit if necessary
echo "MOD_VERSION=$(echo $NORTHSTAR_VERSION | tr -d 'v'| sed --expression 's/-rc/0/' | sed -E 's/([0-9])\.([0-9])\.(0*)([0-9])/\1.\2.\4/;')" >> $GITHUB_ENV
echo "MOD_VERSION=$(echo $NORTHSTAR_VERSION | tr -d 'v'| sed --expression 's/-rc/0/' | sed -E 's/([0-9]+)\.([0-9]+)\.(0*)([0-9])/\1.\2.\4/;')" >> $GITHUB_ENV
# If it's a release candidate we also want to change a few things
if [[ $NORTHSTAR_VERSION == *"-rc"* ]]; then