Skip to content

Commit

Permalink
Use consistent substring match for Poetry version
Browse files Browse the repository at this point in the history
#36
#44

PR #44 introduced version tests for Poetry. The GitHub Actions workflow
builds.yml was matching the version number as a substring anywhere in
the output of `poetry -V`, but the hooks.yml and tests.yml workflows
were matching the version number at the end of the `poetry -V` output.
This would have become an issue if the format of the output was changed,
and sure enough, Poetry 1.2.0 changes the format to have parentheses
around the version number.

This commit will update the hooks.yml and tests.yml workflows to match
the version number as a substring anywhere in the output of `poetry -V`.
  • Loading branch information
br3ndonland committed Sep 19, 2021
1 parent 02066b3 commit 74deab7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
echo "The POETRY_VERSION environment variable is set to $POETRY_VERSION."
echo "The installed Poetry version is $POETRY_VERSION_INSTALLED."
case $POETRY_VERSION_INSTALLED in
*$POETRY_VERSION) echo "Poetry version correct." ;;
*$POETRY_VERSION*) echo "Poetry version correct." ;;
*) echo "Poetry version incorrect." && exit 1 ;;
esac
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
echo "The POETRY_VERSION environment variable is set to $POETRY_VERSION."
echo "The installed Poetry version is $POETRY_VERSION_INSTALLED."
case $POETRY_VERSION_INSTALLED in
*$POETRY_VERSION) echo "Poetry version correct." ;;
*$POETRY_VERSION*) echo "Poetry version correct." ;;
*) echo "Poetry version incorrect." && exit 1 ;;
esac
- name: Install dependencies
Expand Down

0 comments on commit 74deab7

Please sign in to comment.