Skip to content

Commit

Permalink
Check version without importing evidently.__init__. (#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liraim authored Jul 26, 2024
1 parent 261958a commit 5320e5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
env:
PYTHONPATH: ./src
run: |-
VERSION_TO_RELEASE=v$(python -c "from evidently import __version__; print(__version__)" || cat ../src/evidently/_version.py | grep "version_info = " | grep -Po "\d+" | tr '\n' . | cut -c 1-5)
VERSION_TO_RELEASE=v$(python "./src/evidently/_version.py")
if [ "${{ github.ref_name }}" != "$VERSION_TO_RELEASE" ]; then
echo "Release triggered for tag ${{ github.ref_name }} but version.py contains $VERSION_TO_RELEASE"
exit 1
Expand Down
4 changes: 4 additions & 0 deletions src/evidently/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@

version_info = (0, 4, 32)
__version__ = ".".join(map(str, version_info))


if __name__ == "__main__":
print(__version__)

0 comments on commit 5320e5d

Please sign in to comment.