From 2b98d1ee5f8979fbad7ea39a7d6068c6891219cc Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 2 Oct 2024 17:23:39 +0200 Subject: [PATCH] Do not-equal-to comparisons on strings. Versions arent numbers --- .github/workflows/automatic_versioning.yml | 6 +++--- .github/workflows/pip_install.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/automatic_versioning.yml b/.github/workflows/automatic_versioning.yml index 3ff8d6bc..9304a8cb 100644 --- a/.github/workflows/automatic_versioning.yml +++ b/.github/workflows/automatic_versioning.yml @@ -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!" @@ -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!" diff --git a/.github/workflows/pip_install.yml b/.github/workflows/pip_install.yml index 8018f32a..fe00993d 100644 --- a/.github/workflows/pip_install.yml +++ b/.github/workflows/pip_install.yml @@ -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!" @@ -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!"