forked from mwinteringham/restful-booker-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_locally.sh
79 lines (62 loc) · 2.06 KB
/
build_locally.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh
printf "####### RESTFUL-BOOKER-PLATFORM #######
#### ####
#### PRE FLIGHT CHECKS ####
#### ####
#######################################\n"
if ! type -p java; then
printf "The Java Runtime Environment is missing. To learn how to install it please visit:
https://automationintesting.com/setup/settingupjava\n"
exit
fi
if ! type -p javac; then
printf "The Java Development Kit is missing. To learn how to install it please visit:
https://automationintesting.com/setup/settingupjava\n"
exit
fi
if ! type -p mvn; then
printf "Maven is missing. To learn how to install it please visit:
https://automationintesting.com/setup/settingupmaven\n"
exit
fi
if [[ -z "${JAVA_HOME}" ]]; then
printf "JAVA_HOME has not been set. To learn how to set it please visit:
https://automationintesting.com/setup/settingupmaven\n"
exit
fi
if ! node -v; then
printf "Node is missing or broken. To learn how to install it please visit:
https://automationintesting.com/setup/settingupnode\n"
exit
fi
if ! type -p npm; then
printf "Npm is missing. To learn how to install it please visit:
https://automationintesting.com/setup/settingupnode\n"
exit
fi
mvn clean
printf "\n####### RESTFUL-BOOKER-PLATFORM #######
#### ####
#### BUILDING FRONTEND ####
#### ####
#######################################\n"
cd .utilities/rbp-proxy/local
npm install
cd ../../..
cd assets/js
npm install
npm run test
npm run build
printf "\n####### RESTFUL-BOOKER-PLATFORM #######
#### ####
#### BUILDING BACKEND ####
#### ####
#######################################\n"
cd ../..
if [[ -z "${APPLITOOLS_API_KEY}" ]]; then
printf "Skipping visual checks because no applitools api key has been set. Assign a key to APPLITOOLS_API_KEY to run visual checks"
mvn install -Dvisual.skip.test=true
else
mvn install
fi
/bin/bash ./run_locally.sh -e true