diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 52740b2..3c3942a 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -31,7 +31,7 @@ jobs: | sed 's#[^a-zA-Z0-9_\.\-]#_#g'` echo "tag version = $VERSION_TAG" - VERSION_FILE=$(echo 'import version; print(version.VERSION)' | python -) + VERSION_FILE=$(cat VERSION) echo "file version = $VERSION_FILE" if [ "$VERSION_TAG" != "$VERSION_FILE" ]; then diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..8c7fafd --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +4.1.3 \ No newline at end of file diff --git a/setup.py b/setup.py index 5c6f230..8e3934d 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,14 @@ from distutils.core import setup -from version import VERSION with open('requirements.txt') as f: required = f.read().splitlines() +with open("VERSION", "r") as file: + version = file.readline() + setup( name='moira-python-client', - version=VERSION, + version=version, description='Client for Moira - Alerting system based on Graphite data', keywords='moira monitoring client metrics alerting', long_description=""" diff --git a/version.py b/version.py deleted file mode 100644 index 09c37f6..0000000 --- a/version.py +++ /dev/null @@ -1 +0,0 @@ -VERSION='4.1.2' \ No newline at end of file