Skip to content

Commit

Permalink
dirty version check
Browse files Browse the repository at this point in the history
  • Loading branch information
keotl committed Jan 26, 2019
1 parent 2f05c82 commit 5a16dc8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
init_file = f.read()
if "@@VERSION@@" in init_file:
with open(path.join(here, 'jivago/__init__.py'), 'w', encoding='utf-8') as f:
f.write(init_file.replace("@@VERSION@@",
check_output(git_version_command.split()).decode('utf-8').strip().split("-")[0]))
raw_version_info = check_output(git_version_command.split()).decode('utf-8').strip().split("-")
version_number = raw_version_info[0]
if not raw_version_info[1] == '0':
version_number += raw_version_info[2]
f.write(init_file.replace("@@VERSION@@", version_number))

setup(
name='jivago',
Expand Down

0 comments on commit 5a16dc8

Please sign in to comment.