Skip to content

Commit

Permalink
Update version grep to include post release
Browse files Browse the repository at this point in the history
  • Loading branch information
PGijsbers committed Jun 14, 2024
1 parent 96d05b1 commit 8400910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ jobs:
python-version: "3.10"
- name: Match version with input
run: |
GAMA_VERSION=$(grep -Po "\d+\.\d+\.\d+(\.dev\d*)?" "gama/__version__.py")
GAMA_VERSION=$(grep -Po "\d+\.\d+\.\d+((\.dev\d*)|(\.post\d*))?" "gama/__version__.py")
NEW_VERSION=${{ inputs.year }}.${{ inputs.macro }}.${{ inputs.micro }}${{ inputs.suffix }}
echo $GAMA_VERSION $NEW_VERSION
exit $([ $GAMA_VERSION == $NEW_VERSION ])
- name: Match version with tag
run: |
GAMA_VERSION=$(grep -Po "\d+\.\d+\.\d+(\.dev\d*)?" "gama/__version__.py")
GAMA_VERSION=$(grep -Po "\d+\.\d+\.\d+((\.dev\d*)|(\.post\d*))?" "gama/__version__.py")
NEW_VERSION=${{ github.ref }}
echo refs/tags/v$GAMA_VERSION $NEW_VERSION
exit $([ refs/tags/v$GAMA_VERSION == $NEW_VERSION ])
Expand Down

0 comments on commit 8400910

Please sign in to comment.