-
Notifications
You must be signed in to change notification settings - Fork 162
/
build_locally.cmd
85 lines (73 loc) · 2.18 KB
/
build_locally.cmd
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
80
81
82
83
84
85
@echo off
echo ####### RESTFUL-BOOKER-PLATFORM #######
echo #### ####
echo #### PRE FLIGHT CHECKS ####
echo #### ####
echo #######################################
echo:
where java >nul 2>nul
if %errorlevel%==1 (
@echo The Java Runtime Environment is missing. To learn how to install it please visit:
@echo https://automationintesting.com/setup/settingupjava
@echo:
@echo Press CTRL+C to quit
exit
)
where javac >nul 2>nul
if %errorlevel%==1 (
@echo The Java Development Kit is missing. To learn how to install it please visit:
@echo https://automationintesting.com/setup/settingupjava
@echo:
@echo Press CTRL+C to quit
exit
)
where mvn >nul 2>nul
if %errorlevel%==1 (
@echo Maven is missing. To learn how to install it please visit:
@echo https://automationintesting.com/setup/settingupmaven
@echo:
@echo Press CTRL+C to quit
pause>nul
)
if "%JAVA_HOME%"=="" (
@echo JAVA_HOME is not set. To learn how to set it please visit:
@echo https://automationintesting.com/setup/settingupmaven
@echo:
@echo Press CTRL+C to quit
pause>nul
exit
)
where node >nul 2>nul
if %errorlevel%==1 (
@echo Node is missing. To learn how to install it please visit:
@echo https://automationintesting.com/setup/settingupnode
@echo:
@echo Press CTRL+C to quit
pause>nul
)
where npm >nul 2>nul
if %errorlevel%==1 (
@echo Npm is missing. To learn how to install it please visit:
@echo https://automationintesting.com/setup/settingupmaven
@echo:
@echo Press CTRL+C to quit
pause>nul
)
echo:
echo ####### RESTFUL-BOOKER-PLATFORM #######
echo #### ####
echo #### BUILDING PROJECT ####
echo #### ####
echo #######################################
echo:
set cmdFileDirectory=%~dp0
cd %cmdFileDirectory%
call mvn clean
cd %cmdFileDirectory%
if defined APPLITOOLS_API_KEY (
call mvn install -P ci
) else (
echo Skipping visual checks because no applitools api key has been set. Assign a key to APPLITOOLS_API_KEY to run visual checks
call mvn install
)
CALL run_locally.cmd true