mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 01:26:51 +03:00
Moving publish command to setup.py and removing manage.py and its requirements
This commit is contained in:
parent
fb40c949e4
commit
96930c9d36
27
manage.py
27
manage.py
|
@ -1,27 +0,0 @@
|
|||
"""CLI Commands."""
|
||||
|
||||
import os
|
||||
from setup import version
|
||||
from manager import Manager
|
||||
|
||||
|
||||
manager = Manager()
|
||||
|
||||
|
||||
@manager.command
|
||||
def publish(with_tag=True):
|
||||
"""Publishg current version to PyPi."""
|
||||
os.system('python setup.py sdist upload')
|
||||
if with_tag:
|
||||
tag()
|
||||
|
||||
|
||||
@manager.command
|
||||
def tag():
|
||||
"""Make 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()
|
|
@ -1 +0,0 @@
|
|||
manage.py
|
5
setup.py
5
setup.py
|
@ -33,7 +33,7 @@ class PublishCommand(Command):
|
|||
"""Setuptools `publish` command."""
|
||||
|
||||
description = "Publish current distribution to PyPi and create tag"
|
||||
user_options = tuple()
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
"""Init options."""
|
||||
|
@ -43,7 +43,8 @@ class PublishCommand(Command):
|
|||
|
||||
def run(self):
|
||||
"""Command execution."""
|
||||
os.system('python setup.py sdist upload')
|
||||
self.run_command('sdist')
|
||||
self.run_command('upload')
|
||||
os.system('git tag -a {0} -m \'version {0}\''.format(version))
|
||||
os.system('git push --tags')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user