Skip to content

Commit

Permalink
Read package version from file (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetrergeru authored Sep 22, 2023
1 parent a37cc4a commit 9e426b0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 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
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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="""
Expand Down
1 change: 0 additions & 1 deletion version.py

This file was deleted.

0 comments on commit 9e426b0

Please sign in to comment.