Skip to content

Commit 3ddc241

Browse files
committed
Add invoke basic release task
1 parent bc7b923 commit 3ddc241

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def read(*parts):
3131

3232
dev_requires = [
3333
'flake8>=2.0',
34+
'invoke',
35+
'twine'
3436
]
3537

3638

tasks.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import invoke
2+
3+
4+
@invoke.task
5+
def release(version):
6+
"""`version`` should be a string like '0.4' or '1.0'."""
7+
invoke.run('git tag -s {0}'.format(version))
8+
invoke.run('git push --tags')
9+
10+
invoke.run('python setup.py sdist')
11+
invoke.run('python setup.py bdist_wheel')
12+
13+
invoke.run(
14+
'twine upload -s dist/django_babel-{0]* '.format(version)
15+
)

0 commit comments

Comments
 (0)