Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read package version from file #35

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from version import VERSION

не забыть убрать

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.