Skip to content

Commit

Permalink
Make errors in finding current version visible
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiSG committed Apr 24, 2024
1 parent 9325949 commit fd46d00
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/is-version-number-acceptable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ fi

current_version=$(grep '^version =' pyproject.toml | cut -d '"' -f 2) # parsing with tomllib is complicated, see https://github.com/python-poetry/poetry/issues/273

if [[ ! $current_version ]]
then
echo "Error getting current version"
exit 1
fi

if git rev-parse --verify --quiet $current_version
then
echo "Version $current_version already exists in commit:"
git --no-pager log -1 $current_version
echo
echo "Update the version number in pyproject.toml before merging this branch into main."
echo "Look at the CONTRIBUTING.md file to learn how the version number should be updated."
exit 1
exit 2
fi

if ! $(dirname "$BASH_SOURCE")/has-functional-changes.sh | grep --quiet CHANGELOG.md
Expand Down

0 comments on commit fd46d00

Please sign in to comment.