-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (35 loc) · 1 KB
/
Makefile
File metadata and controls
46 lines (35 loc) · 1 KB
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
.PHONY: unit-test functional-test test setup development-setup rsync \
watch-rsync remote-run remote-add-dependency ipython
REMOTE_DIR='/tmp/adminware'
unit-test:
. venv/bin/activate && pytest src/ --ignore=src/nagios_interface/venv
test: unit-test
setup:
bin/setup
development-setup: setup
bin/development-setup
rsync:
rsync \
--rsh='sshpass -p ${PASSWORD} ssh -l root' \
-r \
--delete \
--exclude=venv/ \
--copy-links \
--perms \
. ${IP}:${REMOTE_DIR}
watch-rsync:
rerun \
--name 'Flight Appliance CLI' \
--pattern '**/*' \
--exit \
--no-notify \
make rsync IP=${IP}
# Note: need to become root to run ipa commands; -t option allows coloured
# output.
remote-run: rsync
ssh -t root@${IP} "sudo su - -c \"cd ${REMOTE_DIR} && ${COMMAND}\""
remote-add-dependency:
make remote-run IP=${IP} COMMAND='. venv/bin/activate && pip install ${DEPENDENCY} && pip freeze > requirements.txt'
scp root@${IP}:${REMOTE_DIR}/requirements.txt requirements.txt
ipython:
. venv/bin/activate && ipython