-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (45 loc) · 1.46 KB
/
Makefile
File metadata and controls
54 lines (45 loc) · 1.46 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
47
48
49
50
51
52
53
54
.PHONY: all build test deploy
COFFEE=node_modules/coffee-script/bin/coffee
NODE_PATH=./lib
build: clean
@$(COFFEE) -l -b -o lib src
@echo Done! You can 'make all' to test
test: build
-@killall redis-server 2> /dev/null
-@killall mongod 2> /dev/null
-@killall node 2> /dev/null
@sleep 1
@redis-server test/db/redis.conf > /dev/null &
-@rm -rf /tmp/mongodb
-@mkdir /tmp/mongodb
@mongod --dbpath /tmp/mongodb > /dev/null &
@sleep 1
@NODE_ENV=test NODE_PATH=$(NODE_PATH) node lib/app.js --port 3001 > /tmp/test.log &
@sleep 1
@grep export test/*.coffee |grep -v '#exports' | sed -e 's/:exports\./ -o /' -e 's/ =.*//' | while read case; do echo $$case ; NODE_ENV=test NODE_PATH=$(NODE_PATH) expresso -s $$case; done
@killall redis-server
@killall mongod
@killall node
coverage: build
@node-jscoverage lib lib-cov
-@killall redis-server 2> /dev/null
@sleep 1
@redis-server test/db/redis.conf > /dev/null &
@sleep 1
@NODE_ENV=test NODE_PATH=$(NODE_PATH) node lib/app.js --port 3001 > /tmp/test.log &
@sleep 1
@NODE_ENV=test NODE_PATH=lib-cov:$(NODE_PATH) expresso -s -c 2> reports/coverage | tee reports/coverage.summary
@killall redis-server
@killall node
clean:
-@rm -rf lib/*
-@rm -rf lib-cov
-@rm -rf test.log
-@make clean -C test
deploy:
# works for Walter only
git push origin master
git push deploy master
ssh-add
#ssh -A api.lvtu 'cd ~/lvtu.me/mobileapp/trainapp/server/route-api && git pull origin master && make && ./restart.sh'
all: build test