Skip to content

Commit

Permalink
use pkg_resources to display version
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jul 24, 2019
1 parent babc3c8 commit a1057a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ env:
install:
- pip install -r requirements.txt
- sed -i "s/__VERSION__/${TRAVIS_TAG:-0.0.0}/g" setup.py
- sed -i "s/__VERSION__/${TRAVIS_TAG:-0.0.0}/g" scripts/qgis_plugin_ci.py
- python setup.py install

script:
Expand Down
3 changes: 2 additions & 1 deletion scripts/qgis_plugin_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def main():

# print the version and exit
if args.version:
print('qgis-plugin-ci version: {}'.format('__VERSION__'))
import pkg_resources
print('qgis-plugin-ci version: {}'.format(pkg_resources.get_distribution('qgis-plugin-ci').version))
parser.exit()

# if no command is passed, print the help and exit
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
]
},
package_data={'qgispluginci': ['plugins.xml.template']},
version='0.0.0',
version='__VERSION__',
description='Let QGIS-plugin-ci package and release your QGIS plugins for you. Have a tea or go hiking meanwhile.',
author='Denis Rouzaud',
author_email='[email protected]',
Expand Down

0 comments on commit a1057a3

Please sign in to comment.