forked from miso-belica/sumy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks.py
35 lines (23 loc) · 768 Bytes
/
tasks.py
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
# -*- coding: utf-8 -*-
from invoke import task
@task
def clean(context):
context.run("rm -rf dist build .coverage .pytest_cache .mypy_cache")
@task(clean, default=True)
def test(context):
context.run("pytest")
@task(test)
def install(context):
context.run("python setup.py develop")
@task(test)
def release(context):
context.run("python setup.py register sdist bdist_wheel")
context.run("twine upload dist/*")
@task(test)
def bump(context, version="patch"):
context.run("bumpversion %s" % version)
context.run("git commit --amend")
@task
def docker(context):
context.run("docker build --no-cache --rm=true --tag misobelica/sumy:latest -t misobelica/sumy:0.11.0 .")
context.run("docker push misobelica/sumy --all-tags")