ci/cd(nightly): correct version for nightly release
This commit is contained in:
@@ -28,18 +28,11 @@ jobs:
|
||||
- name: Get version info
|
||||
id: version
|
||||
run: |
|
||||
BASE=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
|
||||
if [[ "$BASE" == *"-nightly"* ]]; then
|
||||
# already a nightly tag, just strip the suffix
|
||||
NEXT_BASE=${BASE%%-nightly*}
|
||||
else
|
||||
# stable tag, increment patch version
|
||||
CLEAN=${BASE%%-nightly*}
|
||||
VERSION_NUM=${CLEAN#v}
|
||||
BASE=$(git describe --tags --abbrev=0 --exclude="*-nightly*" 2>/dev/null || echo "v0.0.0")
|
||||
VERSION_NUM=${BASE#v}
|
||||
IFS='.' read -r major minor patch <<< "$VERSION_NUM"
|
||||
patch=$((patch + 1))
|
||||
NEXT_BASE="v${major}.${minor}.${patch}"
|
||||
fi
|
||||
SHORT=$(git rev-parse --short HEAD)
|
||||
echo "version=${NEXT_BASE}-nightly.${SHORT}" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user