@@ -35,6 +35,8 @@ target_arch='x64'
3535configuration=' '
3636runtime_source_feed=' '
3737runtime_source_feed_key=' '
38+ source_build=false
39+ product_build=false
3840
3941if [ " $( uname) " = " Darwin" ]; then
4042 target_os_name=' osx'
@@ -88,6 +90,9 @@ Options:
8890 --runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs
8991 --runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs
9092
93+ --sourceBuild|-sb Build the repository in source-only mode.
94+ --productBuild|-pb Build the repository in product-build mode.
95+
9196Description:
9297 This build script installs required tools and runs an MSBuild command on this repository
9398 This script can be used to invoke various targets, such as targets to produce packages
@@ -247,6 +252,13 @@ while [[ $# -gt 0 ]]; do
247252 [ -z " ${1:- } " ] && __error " Missing value for parameter --runtime-source-feed-key" && __usage
248253 runtime_source_feed_key=" ${1:- } "
249254 ;;
255+ -sourcebuild|-source-build|-sb)
256+ source_build=true
257+ product_build=true
258+ ;;
259+ -productbuild|-product-build|-pb)
260+ product_build=true
261+ ;;
250262 * )
251263 msbuild_args[${# msbuild_args[*]} ]=" $1 "
252264 ;;
@@ -321,6 +333,11 @@ msbuild_args[${#msbuild_args[*]}]="-p:Sign=$run_sign"
321333msbuild_args[${# msbuild_args[*]} ]=" -p:TargetArchitecture=$target_arch "
322334msbuild_args[${# msbuild_args[*]} ]=" -p:TargetOsName=$target_os_name "
323335
336+ sourceBuildArg=" /p:DotNetBuildSourceOnly=$source_build "
337+ productBuildArg=" /p:DotNetBuildRepo=$product_build "
338+ msbuild_args[${# msbuild_args[*]} ]=$sourceBuildArg
339+ msbuild_args[${# msbuild_args[*]} ]=$productBuildArg
340+
324341if [ -z " $configuration " ]; then
325342 if [ " $ci " = true ]; then
326343 configuration=' Release'
@@ -359,10 +376,6 @@ if [ "$(uname)" = "Darwin" ]; then
359376 ulimit -n 10000
360377fi
361378
362- # tools.sh expects the remaining arguments to be available via the $properties string array variable
363- # TODO: Remove when https://github.com/dotnet/source-build/issues/4337 is implemented.
364- properties=$msbuild_args
365-
366379# Import Arcade
367380. " $DIR /common/tools.sh"
368381
0 commit comments