forked from b12io/orchestra
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
36 lines (28 loc) · 1.11 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
COVERAGE_ANNOTATION=coverage_annotations
TEST_CMD=manage.py test orchestra beanstalk_dispatch --with-xunit --exclude=assert_test*
GULP := $(shell command -v gulp 2> /dev/null)
clean:
find . -name '*.pyo' -delete
find . -name '*.pyc' -delete
find . -name __pycache__ -delete
find . -name '*~' -delete
lint:
flake8 . && gulp lint --production
!(find . -wholename '**migrations**/*.py' -print0 | xargs -0 grep 'RemoveField\|DeleteModel\|AlterModelTable\|AlterUniqueTogether\|RunSQL\|RunPython\|SeparateDatabaseAndState' | grep -v '# manually-reviewed') || { echo "Migrations need to be manually reviewed!"; exit 1; }
!(cd example_project && python3 manage.py makemigrations --dry-run --exit) || { printf "Migrations need to be created. Try: \n\t python3 manage.py makemigrations\n"; exit 1; }
test: lint
cd example_project && python3 $(TEST_CMD)
coverage:
cd example_project && \
coverage run --rcfile=../.coveragerc $(TEST_CMD)
coveralls:
cd example_project && coveralls
npm_install:
ifndef GULP
npm install -g gulp
endif
npm install
gulp_build: npm_install
gulp build --production
build_docs:
cd docs && make html