parse tag prefix
This commit is contained in:
parent
7d6ee1bf2e
commit
fb92430dd1
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user