1
0

parse tag prefix

This commit is contained in:
Marco Maatz 2024-10-19 01:14:03 +02:00
parent 7d6ee1bf2e
commit fb92430dd1

View File

@ -35,9 +35,20 @@ jobs:
steps: steps:
- id: parseStep - id: parseStep
run: | run: |
VERSION=$(echo ${{ inputs.version }} | sed 's|.*/||') input="${{ inputs.version }}"
input="${VERSION#refs/tags/}"
IFS='.' read -r major minor patch build <<< "$VERSION" if [[ "$input" == *"/"* ]]; then
prefix=$(echo "$input" | cut -d'/' -f1)
version=$(echo "$input" | cut -d'/' -f2)
else
prefix="beta"
version="$input"
fi
version=$(echo ${{ inputs.version }} | sed 's|.*/||')
IFS='.' read -r major minor patch build <<< "$version"
if [ -z "$build" ]; then if [ -z "$build" ]; then
build="0" build="0"