Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 7b47b52

Browse files
committed
Merge pull request #9 from codacy/get-version-from-file
Change setup.py to get version from version.py
2 parents af8f157 + f7e687e commit 7b47b52

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,19 @@
1010
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
1111
long_description = f.read()
1212

13+
# Default version
14+
__version__ = '1.1.1'
15+
16+
# Get the correct version from file
17+
try:
18+
exec(open('version.py').read())
19+
except:
20+
pass
21+
1322
setup(
1423
name='codacy-coverage',
1524

16-
version='1.1.0',
25+
version=__version__,
1726

1827
description='Codacy coverage reporter for Python',
1928
long_description=long_description,

version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '1.1.1'

0 commit comments

Comments
 (0)