diff --git a/build.bat b/build.bat index 09892b2..1e3dee1 100644 --- a/build.bat +++ b/build.bat @@ -25,6 +25,8 @@ set "ROOT_DIR=%~dp0" if /i "%~1" == "--type" set "BUILD_TYPES=%~2" & shift & shift & goto getopts if /i "%~1" == "--only" set "ONLY_PHASE=%~2" & shift & shift & goto getopts if /i "%~1" == "--only-dependencies" set ONLY_DEPENDENCIES=1 & shift & goto getopts + if /i "%~1" == "--no-clean" set NO_CLEAN=1 & shift & goto getopts + if /i "%~1" == "--no-update" set NO_UPDATE=1 & shift & goto getopts if /i "%~1" == "--patches" set "ADDITIONAL_PATCHES_DIR=%~2" & shift & shift & goto getopts if not "%~1" == "" echo Unknown option: %~1 & exit 1 @@ -206,6 +208,8 @@ goto :eof echo --type Debug/Release Build only the given build type (default: both) echo --only PHASE Re-build only the given phase (e.g. "gnustep-base") echo --only-dependencies Build only GNUstep dependencies + echo --no-clean Skip the repository cleanup operation + echo --no-update Skip the repository update operation echo --patches DIR Apply additional patches from given directory echo -h, --help, /? Print usage information and exit exit 1 diff --git a/scripts/common.bat b/scripts/common.bat index f6ae90a..9b2fe47 100644 --- a/scripts/common.bat +++ b/scripts/common.bat @@ -32,14 +32,20 @@ exit /b %errorlevel% cd %PROJECT% - if not [%NO_CLEAN%] == [true] ( + if defined NO_CLEAN ( + echo. + echo ### Skipping project cleanup + ) else ( echo. echo ### Cleaning project git reset --hard || exit /b 1 git clean -qfdx || exit /b 1 ) - if not [%NO_UPDATE%] == [true] ( + if defined NO_UPDATE ( + echo. + echo ### Skipping project update + ) else ( echo. :: check out tag/branch if any if not "%TAG%" == "" (