Skip to content

Commit

Permalink
Do not-equal-to comparisons on strings. Versions arent numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Oct 2, 2024
1 parent 0199051 commit 2b98d1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/automatic_versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
fallback_version=$(grep -oP 'fallback_version\s*=\s*"\K[^"]+' "test-suite-$GITHUB_SHA/pyproject.toml")
echo "Testing if this version is the fallback version from pyproject.toml ..."
if [[ "$uninstalled_version" -ne "$fallback_version" ]]; then
if [[ "$uninstalled_version" != "$fallback_version" ]]; then
exit 1
else
echo "... yes!"
Expand Down Expand Up @@ -94,14 +94,14 @@ jobs:
echo "Version from installed testsuite: $installed_version"
echo "Testing if this is the fallback version from pyproject.toml ..."
if [[ "$installed_version" -ne "$fallback_version" ]]; then
if [[ "$installed_version" != "$fallback_version" ]]; then
exit 1
else
echo "... yes!"
fi
echo "Checking if the version imported from eessi.testsuite matches that from the version file ..."
if [[ "$versionfile_version" -ne "$installed_version" ]]; then
if [[ "$versionfile_version" != "$installed_version" ]]; then
exit 1
else
echo "... yes!"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pip_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
echo "Version imported from eessi.testsuite: $testsuite_version"
echo "Checking if the version imported from eessi.testsuite matches that from the version file ..."
if [[ "$versionfile_version" -ne "$testsuite_version" ]]; then
if [[ "$versionfile_version" != "$testsuite_version" ]]; then
exit 1
else
echo "... yes!"
Expand Down Expand Up @@ -110,14 +110,14 @@ jobs:
echo "Version imported from eessi.testsuite: $githttps_testsuite_version"
echo "Checking if the version imported from eessi.testsuite matches that from the version file ..."
if [[ "$githttps_versionfile_version" -ne "$githttps_testsuite_version" ]]; then
if [[ "$githttps_versionfile_version" != "$githttps_testsuite_version" ]]; then
exit 1
else
echo "... yes!"
fi
echo "Checking if the version import from a regular pip install and the git+https based install are the same ..."
if [[ "$githttps_testsuite_version" -ne "$testsuite_version" ]]; then
if [[ "$githttps_testsuite_version" != "$testsuite_version" ]]; then
exit 1
else
echo "... yes!"
Expand Down

0 comments on commit 2b98d1e

Please sign in to comment.