mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 09:36:48 +03:00
34 lines
518 B
Python
34 lines
518 B
Python
"""
|
|
CLI Commands.
|
|
"""
|
|
|
|
import os
|
|
from setup import version
|
|
from manager import Manager
|
|
|
|
|
|
manager = Manager()
|
|
|
|
|
|
@manager.command
|
|
def publish(with_tag=True):
|
|
"""
|
|
Publishes current version to PyPi.
|
|
"""
|
|
os.system('python setup.py sdist upload')
|
|
if with_tag:
|
|
tag()
|
|
|
|
|
|
@manager.command
|
|
def tag():
|
|
"""
|
|
Makes tag from current version.
|
|
"""
|
|
os.system('git tag -a {0} -m \'version {0}\''.format(version))
|
|
os.system('git push --tags')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
manager.main()
|