Skip to content

Commit

Permalink
Read version from file
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetrergeru committed Sep 22, 2023
1 parent a37cc4a commit 9b10a9f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.1.3
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
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="""
Expand Down
1 change: 0 additions & 1 deletion version.py

This file was deleted.

0 comments on commit 9b10a9f

Please sign in to comment.