diff --git a/.github/files/autorelease.sh b/.github/files/autorelease.sh index b4ac6030..5a5f47c9 100755 --- a/.github/files/autorelease.sh +++ b/.github/files/autorelease.sh @@ -28,6 +28,11 @@ elif [[ "$GITHUB_REF" == "refs/heads/trunk" ]]; then fi ROLLING_MODE=true CURRENT_VER=$( sed -nEe 's/^## \[?([^]]*)\]? - .*/\1/;T;p;q' CHANGELOG.md || true ) + if [[ "$CURRENT_VER" != *-alpha ]]; then + # Bump a non-alpha release to the next alpha to avoid confusing version_compare. + CURRENT_VER=${CURRENT_VER%%-*} + CURRENT_VER=${CURRENT_VER%.*}.$(( ${CURRENT_VER##*.} + 1 ))-alpha + fi GIT_SUFFIX=$( git log -1 --format="%ct.g%h" . ) TAG="$CURRENT_VER+rolling.$GIT_SUFFIX" else