-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
52 lines (35 loc) · 974 Bytes
/
Makefile
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
APPNAME=turses
PY=python
DIST=$(PY) setup.py sdist
PIPI=pip install
PIPFLAGS=--ignore-installed --no-deps
TESTRUNNER=py.test
COVERTESTFLAGS=--with-coverage --cover-package=turses --cover-html
WATCHTESTFLAGS=--verbosity=0
all: turses
turses: clean test dist install
dist: clean
$(DIST)
install:
$(PY) setup.py develop
clean: pyc
rm -rf dist/
test: pyc
$(TESTRUNNER)
coverage: pyc
$(TESTRUNNER) $(COVERTESTFLAGS)
pyc:
find . -name "*.pyc" -exec rm {} \;
release: bump publish tag push
bump:
$(EDITOR) HISTORY.rst turses/__init__.py
git add -u
git commit -m "bump `cat turses/__init__.py | grep -o "[[:digit:]]*, [[:digit:]]*, [[:digit:]]*" | tr -s ', ' '.'`"
tag:
git tag v`cat turses/__init__.py | grep -o "[[:digit:]]*, [[:digit:]]*, [[:digit:]]*" | tr -s ', ' '.'`
push:
git push --tags origin master
publish:
$(PY) setup.py sdist upload
watch:
watchmedo shell-command --patterns="*.py" --recursive --command="$(TESTRUNNER) $(WATCHTESTFLAGS)"