diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6076207e14..140f4db9dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/src/evidently/_version.py b/src/evidently/_version.py index 1d5558ecd0..da1167d90d 100644 --- a/src/evidently/_version.py +++ b/src/evidently/_version.py @@ -3,3 +3,7 @@ version_info = (0, 4, 32) __version__ = ".".join(map(str, version_info)) + + +if __name__ == "__main__": + print(__version__)