forked from radiegtya/meteoris2
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdevRun.sh
More file actions
executable file
·55 lines (49 loc) · 1.14 KB
/
devRun.sh
File metadata and controls
executable file
·55 lines (49 loc) · 1.14 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
#!/bin/bash
#
source ./utilsJson.sh
#
function addOrRemoveMocha {
parseJSON MOCHA
if [ ${MOCHA} == "yes" ]; then
meteor add mike:mocha
echo "Mocha added"
else
meteor remove mike:mocha
echo "Mocha removed"
fi
}
function addOrRemoveCucumber {
parseJSON CUCUMBER
if [ ${CUCUMBER} == "yes" ]; then
meteor add xolvio:webdriver
meteor add xolvio:cucumber
echo "Cucumber added"
else
meteor remove xolvio:webdriver
meteor remove xolvio:cucumber
echo "Cucumber removed"
fi
}
function updateMongoUrl {
parseJSON DEVELOPMENT_MONGO_SERVER
if [ ${DEVELOPMENT_MONGO_SERVER} != null ]; then
export MONGO_URL=mongodb://${DEVELOPMENT_MONGO_SERVER}
fi
}
################### Main Program
#
weCanParseJSON
echo "Instantiating variables from settings.json"
updateMongoUrl
#
addOrRemoveMocha
addOrRemoveCucumber
#
echo "### Configuration is . . . "
echo " ~ Connect to Mongo server : " ${MONGO_URL}
echo " ~ Velocity "
echo " ~ Mocha : " ${MOCHA}
echo " ~ Cucumber : " ${CUCUMBER}
echo "### ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "
#
meteor --settings=settings.json