-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
54 lines (42 loc) · 1.45 KB
/
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
53
54
BAKE_OPTIONS=--no-input
define PRINT_HELP_PYSCRIPT
import re, sys
for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
bake: ## generate project using defaults
cookiecutter $(BAKE_OPTIONS) . --overwrite-if-exists
watch: bake ## generate project using defaults and watch for changes
watchmedo shell-command -p '*.*' -c 'make bake -e BAKE_OPTIONS=$(BAKE_OPTIONS)' -W -R -D \{{cookiecutter.project_slug}}/
replay: BAKE_OPTIONS=--replay
replay: watch ## replay last cookiecutter run and watch for changes
;
test: ## run tests quickly with the default Python
pytest
test-all: ## run tests on every Python version with tox
tox -e py35,docs
publish: ## package and upload a release
git checkout develop
git merge master --verbose
git push origin develop --verbose
git push origin master --verbose
sync: ## Sync master and develop branches in both directions
git checkout develop
git pull origin develop --verbose
git checkout master
git pull origin master --verbose
git checkout develop
git merge master --verbose
git checkout master
git merge develop --verbose
git checkout develop
release: sync test test-all publish ## package and upload a release
;
upgrade-requirements: ## compile and freeze requirements file
pip-compile -U --allow-unsafe --annotate