python-dependency-injector/manage.py

28 lines
493 B
Python
Raw Normal View History

2015-03-09 22:54:05 +00:00
"""CLI Commands."""
2015-01-11 13:03:45 +00:00
import os
from setup import version
from manager import Manager
manager = Manager()
@manager.command
def publish(with_tag=True):
2015-03-09 22:54:05 +00:00
"""Publish current version to PyPi."""
2015-01-11 13:03:45 +00:00
os.system('python setup.py sdist upload')
if with_tag:
tag()
@manager.command
def tag():
2015-03-09 22:54:05 +00:00
"""Make tag from current version."""
2015-01-11 13:03:45 +00:00
os.system('git tag -a {0} -m \'version {0}\''.format(version))
os.system('git push --tags')
if __name__ == '__main__':
manager.main()