Skip to content

Commit

Permalink
Set exact version 4.1.2 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetrergeru authored Sep 22, 2023
1 parent 5d65a88 commit a37cc4a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@ jobs:
- name: Build a binary wheel and a source tarball
run: |
export PYTHON_MOIRA_CLIENT_VERSION=`echo ${GITHUB_REF_NAME} \
VERSION_TAG=`echo ${GITHUB_REF_NAME} \
| sed -r 's#v([0-9]+\.[0-9]\.[0-9])#\1#g' \
| sed 's#[^a-zA-Z0-9_\.\-]#_#g'`
echo $PYTHON_MOIRA_CLIENT_VERSION
echo "tag version = $VERSION_TAG"
VERSION_FILE=$(echo 'import version; print(version.VERSION)' | python -)
echo "file version = $VERSION_FILE"
if [ "$VERSION_TAG" != "$VERSION_FILE" ]; then
echo "Version in file 'version.py' must be the same as the pushed tag"
exit 1
fi
python -m build --sdist --wheel --outdir dist/
# make this available for test
# - name: Publish distribution 📦 to Test PyPI
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from distutils.core import setup
import os
from version import VERSION

with open('requirements.txt') as f:
required = f.read().splitlines()

setup(
name='moira-python-client',
version=os.environ['PYTHON_MOIRA_CLIENT_VERSION'],
version=VERSION,
description='Client for Moira - Alerting system based on Graphite data',
keywords='moira monitoring client metrics alerting',
long_description="""
Expand Down
1 change: 1 addition & 0 deletions version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION='4.1.2'

0 comments on commit a37cc4a

Please sign in to comment.