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

[crmsh-4.6] Unify version definition #1280

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
# Note that this script only installs the python modules,
# the other parts of crmsh are installed by autotools
from setuptools import setup
import contextlib
import re

VERSION = '0.0.1'

with contextlib.suppress(Exception):
with open('version', 'r', encoding='ascii') as f:
match = re.match('^\\d+\\.\\d+\\.\\d+', f.read().strip())
if match:
VERSION = match.group(0)

setup(name='crmsh',
version='4.5.0',
version=VERSION,
description='Command-line interface for High-Availability cluster management',
author='Kristoffer Gronlund, Xin Liang',
author_email='XLiang@suse.com',
Expand Down
2 changes: 1 addition & 1 deletion version.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@VERSION@
@PACKAGE_VERSION@