Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add no-clean and no-update flags #11

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions scripts/common.bat
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ exit /b %errorlevel%

cd %PROJECT%

if not [%NO_CLEAN%] == [true] (
if defined NO_CLEAN (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails the CI builds, as the release builds no longer get cleaned due to this:

:: always clean projects for subsequent build types
set NO_CLEAN=false

With this change, we’d need to unset NO_CLEAN above instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll fix this.

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%" == "" (
Expand Down