-
Notifications
You must be signed in to change notification settings - Fork 163
/
build_locally.sh
executable file
·61 lines (49 loc) · 1.72 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
#!/bin/sh -e
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
printf "\n####### RESTFUL-BOOKER-PLATFORM #######
#### ####
#### BUILDING PROJECT ####
#### ####
#######################################\n"
mvn clean
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
else
mvn install -P ci
fi
/bin/bash ./run_locally.sh -e true