-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.template
45 lines (35 loc) · 1.09 KB
/
Makefile.template
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
REMOTE_SERVER = 'remote-server'
REMOTE_PATH = '~/personal/femida'
.PHONY: sync
sync:
rsync -r --exclude-from='.gitignore' --exclude='.git' -v ./ ${REMOTE_SERVER}:${REMOTE_PATH}
.PHONY: sync-data
sync-data:
rsync -r ./data ${REMOTE_SERVER}:${REMOTE_PATH}
.PHONY: pep8
pep8:
pycodestyle --show-source femida_detect
.PHONY: pep8
pep8:
pycodestyle --config python/setup.cfg --show-source python/femida_detect frontend/app/main.py
.PHONY: lint
lint:
pylint python/femida_detect frontend/app/main.py
.PHONY: codestyle
codestyle: pep8 lint
.PHONY: install
install:
pip install -e python --process-dependency-links
.PHONY: configure
configure:
if [ ! -f .git/hooks/pre-commit ]; then ln -s ../../git-hooks/pre-commit .git/hooks/pre-commit; fi;
if [ ! -f local.cfg ]; then touch local.cfg; fi;
if ! grep -q "user:" local.cfg; then echo "user: `whoami`" >> local.cfg; fi;
.PHONY: tests
tests:
py.test
.PHONY: deploy
deploy:
make sync
ssh ${REMOTE_SERVER} "cd ${REMOTE_PATH} && docker container stop \$$(docker container ls -a -q)";
ssh ${REMOTE_SERVER} "cd ${REMOTE_PATH} && docker-compose up --build";