-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.sh
executable file
·65 lines (57 loc) · 1.52 KB
/
setup.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
echo "Setting up VersaTile development env "
server_dir="`pwd`/server"
tests_dir="`pwd`/tests"
e2e_tests_dir=$tests_dir/e2e
static_analizer_dir=$tests_dir/static-analyzer
unit_tests_dir=$tests_dir/unit-tests
deployment_dir=
while getopts ":d" opt ; do
case $opt in
d)
echo "setup with deployment features"
deployment_dir=./deployment
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "no options"
;;
esac
done
echo "Installing dependencies from the app server"
cd $server_dir
npm install --silent
if [[ $? -ne 0 ]]; then
echo "error running npm install at $server_dir"
fi
echo "Installing dependencies for unit-tests"
cd $unit_tests_dir
npm install --silent
if [[ $? -ne 0 ]]; then
echo "error running npm install at $unit_tests_dir"
fi
echo "Installing dependencies for the static-analyzer"
cd $static_analizer_dir
npm install --silent
if [[ $? -ne 0 ]]; then
echo "error running npm install at $static_analizer_dir"
fi
echo "Installing dependencies for the end-to-end test"
cd $e2e_tests_dir
npm install --silent
if [[ $? -ne 0 ]]; then
echo "error running npm install at $e2e_tests_dir"
fi
echo "Checking with protractor is installed globally"
check_output=$(npm list --global true | grep protractor)
if [[ -z $check_output ]]; then
echo "--Installing protractor and selenium server "
npm install -g protractor
echo "--Updating webdriver-manager"
webdriver-manager update
else
echo "Protractor and selenium are already installed"
fi