forked from mopidy/mopidy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfabfile.py
52 lines (36 loc) · 1.01 KB
/
fabfile.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from fabric.api import execute, local, settings, task
@task
def docs():
local('make -C docs/ html')
@task
def autodocs():
auto(docs)
@task
def test(path=None):
path = path or 'tests/'
local('nosetests ' + path)
@task
def autotest(path=None):
auto(test, path=path)
@task
def coverage(path=None):
path = path or 'tests/'
local(
'nosetests --with-coverage --cover-package=mopidy '
'--cover-branches --cover-html ' + path)
@task
def autocoverage(path=None):
auto(coverage, path=path)
def auto(task, *args, **kwargs):
while True:
local('clear')
with settings(warn_only=True):
execute(task, *args, **kwargs)
local(
'inotifywait -q -e create -e modify -e delete '
'--exclude ".*\.(pyc|sw.)" -r docs/ mopidy/ tests/')
@task
def update_authors():
# Keep authors in the order of appearance and use awk to filter out dupes
local(
"git log --format='- %aN <%aE>' --reverse | awk '!x[$0]++' > AUTHORS")