Skip to content

Commit

Permalink
Merge pull request #12 from climatepolicyradar/bugfix/correct-bash-co…
Browse files Browse the repository at this point in the history
…nditional-for-version-checks

Bugfix/correct bash conditional for version checks
  • Loading branch information
THOR300 authored Apr 8, 2024
2 parents f8235a1 + e175980 commit 5e21d2b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/actions/check-version-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
PYPROJECT_EQUALS_GITHUB_RELEASE=$(python -c "from packaging.version import Version; print(Version('${PYPROJECT_VERSION}') == Version('${GITHUB_RELEASE_VERSION}'))")
echo "PYPROJECT_EQUALS_GITHUB_RELEASE=${PYPROJECT_EQUALS_GITHUB_RELEASE}"
if [[ PYPROJECT_EQUALS_GITHUB_RELEASE ]]; then
if [[ "$PYPROJECT_EQUALS_GITHUB_RELEASE" == True ]]; then
echo "The pyproject.toml version is equal to the latest GitHub release."
else
echo "The pyproject.toml version is NOT equal to the the latest GitHub release."
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/check-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
PYPROJECT_GREATER_THAN_GITHUB_RELEASE=$(python -c "from packaging.version import Version; print(Version('${PYPROJECT_VERSION}') > Version('${GITHUB_RELEASE_VERSION}'))")
echo "PYPROJECT_GREATER_THAN_GITHUB_RELEASE=${PYPROJECT_GREATER_THAN_GITHUB_RELEASE}"
if [[ PYPROJECT_GREATER_THAN_GITHUB_RELEASE ]]; then
if [[ "$PYPROJECT_GREATER_THAN_GITHUB_RELEASE" == True ]]; then
echo "The pyproject.toml version is greater than the latest GitHub release."
else
echo "The pyproject.toml version is not greater than the latest GitHub release."
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:

test:
runs-on: ubuntu-latest
needs: [precommit-checks, fixme-checks, package-version-checks]
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -44,8 +45,8 @@ jobs:

test-publish:
runs-on: ubuntu-latest
needs: [test]
timeout-minutes: 10
needs: [precommit-checks, fixme-checks, package-version-checks, test]
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:

test:
runs-on: ubuntu-latest
needs: [precommit-checks, fixme-checks, package-version-checks]
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -43,8 +44,8 @@ jobs:

publish:
runs-on: ubuntu-latest
needs: [test]
timeout-minutes: 10
needs: [precommit-checks, fixme-checks, package-version-checks, test]
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion src/cpr_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_MAJOR = "1"
_MINOR = "0"
_PATCH = "1"
_PATCH = "2"
_SUFFIX = ""

VERSION_SHORT = "{0}.{1}".format(_MAJOR, _MINOR)
Expand Down

0 comments on commit 5e21d2b

Please sign in to comment.