java version checking

This commit is contained in:
SpikeHD 2022-05-02 22:35:53 -07:00
parent 474752df17
commit 66abd0feba
2 changed files with 19 additions and 2 deletions

View File

@ -34,6 +34,9 @@ echo Downloading keystore.p12...
:: Download the keystore.p12 file
powershell Invoke-WebRequest -Uri %ARTIFACT_URL% -OutFile "./%FOLDER_NAME%/keystore.p12"
:: Check java version, this will automatically output some tuff
call .\scripts\javaver.cmd %BRANCH%
:: Allow resource downloading to be optional, since it takes a while
set REPLY=y
set /p "REPLY=Download server resources? (This can take a while) [y|n]:"

View File

@ -21,16 +21,30 @@ if %BRANCH% EQU stable (
:: Ensure java 8
if %MAJOR% EQU 1 (
if %MINOR% LSS 8 (
echo Java version is less than 8, please download Java 8
echo =======================================================================================
echo !! Java version is less than 8 !!
echo Please download Java 8 to ensure %BRANCH% branch server launches correctly.
echo =======================================================================================
exit /b
)
)
if %MAJOR% NEQ 1 (
echo =======================================================================================
echo !! Java version is not 8 !!
echo Please download Java 8 to ensure %BRANCH% branch server launches correctly.
echo =======================================================================================
exit /b
)
)
if %BRANCH% EQU development (
:: Ensure java 17
if %MAJOR% LSS 17 (
echo Java version is less than 17, please download Java 17
echo =======================================================================================
echo !! Java version is less than 17 !!
echo Please download Java 17 to ensure %BRANCH% branch server launches correctly.
echo =======================================================================================
exit /b
)
)