Skip to content

Commit

Permalink
Remove __init__ version check (#126)
Browse files Browse the repository at this point in the history
Co-authored-by: ElliottKasoar <ElliottKasoar@users.noreply.github.com>
  • Loading branch information
ElliottKasoar and ElliottKasoar committed Apr 29, 2024
1 parent 5045e0a commit d5721bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
5 changes: 0 additions & 5 deletions .github/scripts/check_version.py

This file was deleted.

15 changes: 4 additions & 11 deletions .github/workflows/publish-on-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,15 @@ jobs:
run: |
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT
- name: Get versions from __init__ and pyproject.toml
- name: Get version from pyproject.toml
run: |
export PYTHONPATH=$(pwd)
echo "VERSION=$(python .github/scripts/check_version.py)" >> $GITHUB_ENV
echo "POETRYVERSION=$(poetry version --short)" >> $GITHUB_ENV
echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV
- name: Check __init__ matches pyproject.toml
if: ${{ env.VERSION != env.POETRYVERSION }}
run: |
echo "Version in __init__.py and pyproject.toml do not match"
exit 1
- name: Check versions match tag
- name: Check version matches tag
if: ${{ ! contains(github.ref, env.VERSION) }}
run: |
echo "Git tag does not match version in __init__.py"
echo "Git tag does not match version in pyproject.toml"
exit 1
- name: Create Release
Expand Down

0 comments on commit d5721bc

Please sign in to comment.