script fixes
Some checks failed
sgraves/cpp-build-system/pipeline/head There was a failure building this commit
Some checks failed
sgraves/cpp-build-system/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -4,12 +4,12 @@ setlocal EnableExtensions
|
||||
|
||||
set "SED=sed"
|
||||
|
||||
set "SCRIPTS_DIR=%~dp0%"
|
||||
set "SCRIPTS_DIR=%~dp0"
|
||||
pushd "%SCRIPTS_DIR%"
|
||||
set "SCRIPTS_DIR=%CD%"
|
||||
popd
|
||||
|
||||
set "SOURCE_DIR=%~dp0%.."
|
||||
set "SOURCE_DIR=%~dp0.."
|
||||
pushd "%SOURCE_DIR%"
|
||||
set "SOURCE_DIR=%CD%"
|
||||
popd
|
||||
@@ -21,8 +21,8 @@ echo %SOURCE_DIR%
|
||||
echo %TEST_DIR%
|
||||
|
||||
set "PLATFORM=msys2"
|
||||
set "BUILD_TYPE=%~1"
|
||||
set "WITH_TYPE=%~2"
|
||||
set "BUILD_TYPE=%1"
|
||||
set "WITH_TYPE=%2"
|
||||
|
||||
if /I not "%BUILD_TYPE%"=="shared" if /I not "%BUILD_TYPE%"=="static" (
|
||||
call :ERROR_EXIT "Must specify 'shared' or 'static'." 1
|
||||
@@ -46,7 +46,7 @@ if "%WITH_TYPE%"=="7" set "NAME=%NAME%_crypto_no_boost"
|
||||
if exist "%TEST_DIR%\%NAME%\" rd /s /q "%TEST_DIR%\%NAME%"
|
||||
|
||||
pushd "%SOURCE_DIR%"
|
||||
call ".\create_project.cmd" "%NAME%" "%TEST_DIR%" || (
|
||||
call .\create_project.cmd %NAME% %TEST_DIR% || (
|
||||
call :ERROR_EXIT "Failed to create %PLATFORM% project." 2
|
||||
)
|
||||
popd
|
||||
@@ -68,11 +68,11 @@ if /I "%BUILD_TYPE%"=="shared" (
|
||||
%SED% -i "s/PROJECT_STATIC_LINK=ON/PROJECT_STATIC_LINK=OFF/g" ".\config.sh"
|
||||
)
|
||||
|
||||
call ".\scripts\make_win32.cmd" || (
|
||||
call .\scripts\make_win32.cmd || (
|
||||
call :ERROR_EXIT "build %PLATFORM% failed." 3
|
||||
)
|
||||
|
||||
call ".\scripts\run_tests.cmd" || (
|
||||
call .\scripts\run_tests.cmd || (
|
||||
call :ERROR_EXIT "testing %PLATFORM% failed." 3
|
||||
)
|
||||
popd
|
||||
@@ -82,5 +82,5 @@ if exist "%TEST_DIR%\%NAME%\" rd /s /q "%TEST_DIR%\%NAME%"
|
||||
exit 0
|
||||
|
||||
:ERROR_EXIT
|
||||
echo "%~1"
|
||||
exit %~2
|
||||
echo %1
|
||||
exit %2
|
||||
|
||||
Reference in New Issue
Block a user