build: cleanup release task
This commit is contained in:
parent
0dd3169247
commit
a82d729246
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
|
dist/
|
||||||
Wutta_Demo.egg-info/
|
Wutta_Demo.egg-info/
|
||||||
|
|
20
tasks.py
20
tasks.py
|
@ -9,25 +9,13 @@ import shutil
|
||||||
from invoke import task
|
from invoke import task
|
||||||
|
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
exec(open(os.path.join(here, 'wuttademo', '_version.py')).read())
|
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def release(c):
|
def release(c):
|
||||||
"""
|
"""
|
||||||
Release a new version of Wutta Demo
|
Release a new version of Wutta Demo
|
||||||
"""
|
"""
|
||||||
# rebuild local tar.gz file for distribution
|
if os.path.exists('dist'):
|
||||||
if os.path.exists('Wutta_Demo.egg-info'):
|
shutil.rmtree('dist')
|
||||||
shutil.rmtree('Wutta_Demo.egg-info')
|
|
||||||
c.run('python -m build --sdist')
|
c.run('python -m build --sdist')
|
||||||
|
c.run('twine upload dist/*')
|
||||||
# filename of built package
|
|
||||||
filename = 'Wutta-Demo-{}.tar.gz'.format(__version__)
|
|
||||||
|
|
||||||
# TODO: uncomment and update these details, to upload to private PyPI
|
|
||||||
#c.run('scp dist/{} rattail@pypi.example.com:/srv/pypi/wuttademo/'.format(filename))
|
|
||||||
|
|
||||||
# TODO: or, uncomment this to upload to *public* PyPI
|
|
||||||
#c.run('twine upload dist/{}'.format(filename))
|
|
||||||
|
|
Loading…
Reference in a new issue