[source-build] Expose CleanWhileBuilding msbuild option in build.sh (#13642)

This commit is contained in:
Michael Simons 2022-04-14 19:14:43 -05:00 committed by GitHub
parent 3da46c012c
commit 1f059f340c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -132,7 +132,7 @@ jobs:
customBuildArgs="$customBuildArgs --poison"
fi
docker run --rm -v $(tarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh ${customBuildArgs} $(additionalBuildArgs) -- /p:CleanWhileBuilding=true
docker run --rm -v $(tarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh --clean-while-building ${customBuildArgs} $(additionalBuildArgs)
displayName: Build Tarball
- script: |

View file

@ -5,11 +5,12 @@ IFS=$'\n\t'
usage() {
echo "usage: $0 [options]"
echo "options:"
echo " --clean-while-building cleans each repo after building (reduces disk space usage)"
echo " --online build using online sources"
echo " --with-packages <dir> use the specified directory of previously-built packages"
echo " --with-sdk <dir> use the SDK in the specified directory for bootstrapping"
echo " --poison build with poisoning checks"
echo " --run-smoke-test don't build; run smoke tests"
echo " --with-packages <dir> use the specified directory of previously-built packages"
echo " --with-sdk <dir> use the SDK in the specified directory for bootstrapping"
echo "use -- to send the remaining arguments to MSBuild"
echo ""
}
@ -29,9 +30,8 @@ while :; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--run-smoke-test)
alternateTarget=true
MSBUILD_ARGUMENTS+=( "/t:RunSmokeTest" )
--clean-while-building)
MSBUILD_ARGUMENTS+=( "/p:CleanWhileBuilding=true")
;;
--online)
MSBUILD_ARGUMENTS+=( "/p:BuildWithOnlineSources=true")
@ -39,6 +39,10 @@ while :; do
--poison)
MSBUILD_ARGUMENTS+=( "/p:EnablePoison=true")
;;
--run-smoke-test)
alternateTarget=true
MSBUILD_ARGUMENTS+=( "/t:RunSmokeTest" )
;;
--with-packages)
CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR="$(cd -P "$2" && pwd)"
if [ ! -d "$CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR" ]; then