-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtasks.py
More file actions
executable file
·42 lines (30 loc) · 829 Bytes
/
tasks.py
File metadata and controls
executable file
·42 lines (30 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- coding: utf-8 -*-
from invoke import task
@task
def clean(ctx):
ctx.run('rm -rf build dist *.egg requires_io/__pycache__ requires_io/*.pyc')
@task
def bumpversion(ctx, part='patch'):
clean(ctx)
ctx.run('pip install --upgrade bumpversion')
ctx.run('bumpversion ' + part)
ctx.run('git push --tags')
@task
def tox(ctx):
ctx.run('pip install --upgrade tox')
ctx.run('tox')
@task
def flake8(ctx):
ctx.run('pip install --upgrade flake8')
ctx.run('flake8 --max-line-length=120 requires_io')
@task
def pypi(ctx):
clean(ctx)
ctx.run('pip install --upgrade wheel')
ctx.run('python setup.py clean')
ctx.run('python setup.py register')
ctx.run('python setup.py sdist bdist_wheel upload')
@task
def release(ctx, part='patch'):
bumpversion(ctx, part)
pypi(ctx)