Skip to content

Commit

Permalink
workflows:on-push - make version test more dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Nov 8, 2023
1 parent 3350c07 commit ef363e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: |
project_name="$(grep --color=never 'name *= *".*"' pyproject.toml)"
project_name="${project_name%\"}"
project_name="${project_name#*\"}"
version_project="$(grep --color=never 'version *= *".*"' pyproject.toml)"
version_project="${version_project%\"}"
version_project="${version_project#*\"}"
version_package="$(grep --color=never '__version__ *= *".*"' acacore/__version__.py)"
version_package="$(grep --color=never '__version__ *= *".*"' "$project_name"/__version__.py)"
version_package="${version_package%\"}"
version_package="${version_package#*\"}"
test "$version_project" = "$version_package"
Expand Down

0 comments on commit ef363e2

Please sign in to comment.