forked from build-canaries/nevergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
develop.sh
executable file
·46 lines (35 loc) · 1.39 KB
/
develop.sh
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
#!/bin/bash -e
trap 'killall' INT
killall() {
trap '' INT TERM
echo
echo "shutting down..."
kill -TERM 0
wait
echo "done!"
}
echo
echo "######################################################################################"
echo "# This script will run several commands to watch the source files for changes. #"
echo "# #"
echo "# One downside is all output is currently just spammed onto the same terminal window #"
echo "# and may get a little hard to read. #"
echo "# #"
echo "# Killing this script will automatically kill all the spawned processes. #"
echo "######################################################################################"
echo
./check-node.sh
echo "clean"
./lein.sh clean
npm run clean
echo "fetching node modules and performing first build"
./ci/dependencies.sh
echo "watching the js for changes ..."
npm run watchJs &
echo "starting the CI stub server ..."
npm run ci-stub-server &
echo "running the server ..."
./lein.sh run &
wait
# Proper clean up taken from this unix stackexchange post:
# http://unix.stackexchange.com/questions/55558/how-can-i-kill-and-wait-for-background-processes-to-finish-in-a-shell-script-whe