Create binlog for init-source-only.proj only when requested (#19379)

This commit is contained in:
Viktor Hofer 2024-04-10 07:25:39 +02:00 committed by GitHub
parent b251ece75f
commit 226c8fbd20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -233,8 +233,13 @@ function Build {
fi
if [ "$test" != "true" ]; then
initSourceOnlyBinaryLog=""
if [[ "$binary_log" == true ]]; then
initSourceOnlyBinaryLog="/bl:\"$log_dir/init-source-only.binlog\""
fi
"$CLI_ROOT/dotnet" build-server shutdown
"$CLI_ROOT/dotnet" msbuild "$scriptroot/eng/init-source-only.proj" -bl:"$scriptroot/artifacts/log/$configuration/BuildMSBuildSdkResolver.binlog" $properties
"$CLI_ROOT/dotnet" msbuild "$scriptroot/eng/init-source-only.proj" $initSourceOnlyBinaryLog $properties
# kill off the MSBuild server so that on future invocations we pick up our custom SDK Resolver
"$CLI_ROOT/dotnet" build-server shutdown
fi