Skip to content

Commit 07072c2

Browse files
authored
fix(ci): handle pre-release version
Include pre-release suffix when comparing released vs current version in our CI script. Pull-Request: #5886.
1 parent 1c9b3ca commit 07072c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/ensure-version-bump-and-changelog.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ MERGE_BASE=$(git merge-base "$HEAD_SHA" "$PR_BASE") # Find the merge base. This
1010
SRC_DIFF_TO_BASE=$(git diff "$HEAD_SHA".."$MERGE_BASE" --name-status -- "$DIR_TO_CRATE/src" "$DIR_TO_CRATE/Cargo.toml")
1111
CHANGELOG_DIFF=$(git diff "$HEAD_SHA".."$MERGE_BASE" --name-only -- "$DIR_TO_CRATE/CHANGELOG.md")
1212

13-
RELEASED_VERSION=$(git tag --sort=version:refname | grep "^$CRATE-v" | tail -n1 | grep -Po "\d+\.\d+\.\d+")
13+
RELEASED_VERSION=$(git tag --sort=version:refname | grep "^$CRATE-v" | tail -n1 | grep -Po "\d+\.\d+\.\d+(-.+)?")
1414

1515

1616
# If the source files of this crate weren't touched in this PR, exit early.

0 commit comments

Comments
 (0)