Add basic release task
This commit is contained in:
parent
ec84808332
commit
1b60ca5d34
26
tasks.py
Normal file
26
tasks.py
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# -*- coding: utf-8; -*-
|
||||||
|
"""
|
||||||
|
Tasks for Messkit
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from invoke import task
|
||||||
|
|
||||||
|
|
||||||
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
exec(open(os.path.join(here, 'messkit', '_version.py')).read())
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def release(ctx):
|
||||||
|
"""
|
||||||
|
Release a new version of Messkit
|
||||||
|
"""
|
||||||
|
# rebuild local tar.gz file for distribution
|
||||||
|
shutil.rmtree('Messkit.egg-info')
|
||||||
|
ctx.run('python setup.py sdist --formats=gztar')
|
||||||
|
|
||||||
|
# upload to public PyPI
|
||||||
|
ctx.run('twine upload dist/Messkit-{}.tar.gz'.format(__version__))
|
Loading…
Reference in a new issue