Small fixes (#21982)
* Restore default "/bl" setting if `$BinaryLog` nits: - remove extra configure-toolset.ps1|sh imports - remove duplicate `/v:$verbosity` addition to `msbuild` command line from build.sh * Correct the feeds to match latest recommendations
This commit is contained in:
parent
58cf2304a6
commit
4420a7d262
|
|
@ -2,14 +2,12 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<clear />
|
<clear />
|
||||||
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
|
|
||||||
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
|
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
|
||||||
|
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
|
||||||
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
|
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
|
||||||
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
|
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
|
||||||
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn/api/v3/index.json" />
|
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn/api/v3/index.json" />
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
|
|
||||||
<add key="aspnetcore-tools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
|
|
||||||
<add key="roslyn-tools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
|
<add key="roslyn-tools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
|
||||||
<!-- Used for the SiteExtension 3.1 bits that are included in the 5.0 build -->
|
<!-- Used for the SiteExtension 3.1 bits that are included in the 5.0 build -->
|
||||||
<add key="dotnet31-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json" />
|
<add key="dotnet31-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json" />
|
||||||
|
|
|
||||||
20
build.ps1
20
build.ps1
|
|
@ -253,9 +253,7 @@ $RunRestore = if ($NoRestore) { $false }
|
||||||
# Target selection
|
# Target selection
|
||||||
$MSBuildArguments += "/p:Restore=$RunRestore"
|
$MSBuildArguments += "/p:Restore=$RunRestore"
|
||||||
$MSBuildArguments += "/p:Build=$RunBuild"
|
$MSBuildArguments += "/p:Build=$RunBuild"
|
||||||
if (-not $RunBuild) {
|
if (-not $RunBuild) { $MSBuildArguments += "/p:NoBuild=true" }
|
||||||
$MSBuildArguments += "/p:NoBuild=true"
|
|
||||||
}
|
|
||||||
$MSBuildArguments += "/p:Pack=$Pack"
|
$MSBuildArguments += "/p:Pack=$Pack"
|
||||||
$MSBuildArguments += "/p:Test=$Test"
|
$MSBuildArguments += "/p:Test=$Test"
|
||||||
$MSBuildArguments += "/p:Sign=$Sign"
|
$MSBuildArguments += "/p:Sign=$Sign"
|
||||||
|
|
@ -364,18 +362,20 @@ Remove-Item variable:global:_MSBuildExe -ea Ignore
|
||||||
# Import Arcade
|
# Import Arcade
|
||||||
. "$PSScriptRoot/eng/common/tools.ps1"
|
. "$PSScriptRoot/eng/common/tools.ps1"
|
||||||
|
|
||||||
|
# Add default .binlog location if not already on the command line. tools.ps1 does not handle this; it just checks
|
||||||
|
# $BinaryLog, $CI and $ExcludeCIBinarylog values for an error case. But tools.ps1 provides a nice function to help.
|
||||||
|
if ($BinaryLog) {
|
||||||
|
$bl = GetMSBuildBinaryLogCommandLineArgument($MSBuildArguments)
|
||||||
|
if (-not $bl) {
|
||||||
|
$MSBuildArguments += "/bl:" + (Join-Path $LogDir "Build.binlog")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Capture MSBuild crash logs
|
# Capture MSBuild crash logs
|
||||||
$env:MSBUILDDEBUGPATH = $LogDir
|
$env:MSBUILDDEBUGPATH = $LogDir
|
||||||
|
|
||||||
$local:exit_code = $null
|
$local:exit_code = $null
|
||||||
try {
|
try {
|
||||||
# Import custom tools configuration, if present in the repo.
|
|
||||||
# Note: Import in global scope so that the script set top-level variables without qualification.
|
|
||||||
$configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
|
|
||||||
if (Test-Path $configureToolsetScript) {
|
|
||||||
. $configureToolsetScript
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set this global property so Arcade will always initialize the toolset. The error message you get when you build on a clean machine
|
# Set this global property so Arcade will always initialize the toolset. The error message you get when you build on a clean machine
|
||||||
# with -norestore is not obvious about what to do to fix it. As initialization takes very little time, we think always initializing
|
# with -norestore is not obvious about what to do to fix it. As initialization takes very little time, we think always initializing
|
||||||
# the toolset is a better default behavior.
|
# the toolset is a better default behavior.
|
||||||
|
|
|
||||||
26
build.sh
26
build.sh
|
|
@ -288,10 +288,6 @@ if [ -z "$configuration" ]; then
|
||||||
fi
|
fi
|
||||||
msbuild_args[${#msbuild_args[*]}]="-p:Configuration=$configuration"
|
msbuild_args[${#msbuild_args[*]}]="-p:Configuration=$configuration"
|
||||||
|
|
||||||
# Set verbosity
|
|
||||||
echo "Setting msbuild verbosity to $verbosity"
|
|
||||||
msbuild_args[${#msbuild_args[*]}]="-verbosity:$verbosity"
|
|
||||||
|
|
||||||
# Set up additional runtime args
|
# Set up additional runtime args
|
||||||
toolset_build_args=()
|
toolset_build_args=()
|
||||||
if [ ! -z "$dotnet_runtime_source_feed$dotnet_runtime_source_feed_key" ]; then
|
if [ ! -z "$dotnet_runtime_source_feed$dotnet_runtime_source_feed_key" ]; then
|
||||||
|
|
@ -328,15 +324,25 @@ fi
|
||||||
# Import Arcade
|
# Import Arcade
|
||||||
. "$DIR/eng/common/tools.sh"
|
. "$DIR/eng/common/tools.sh"
|
||||||
|
|
||||||
|
# Add default .binlog location if not already on the command line. tools.sh does not handle this; it just checks
|
||||||
|
# $binary_log, $ci and $exclude_ci_binary_log values for an error case.
|
||||||
|
if [[ "$binary_log" == true ]]; then
|
||||||
|
found=false
|
||||||
|
for arg in "${msbuild_args[@]}"; do
|
||||||
|
opt="$(echo "${arg/#--/-}" | awk '{print tolower($0)}')"
|
||||||
|
if [[ "$opt" == [-/]bl:* || "$opt" == [-/]binarylogger:* ]]; then
|
||||||
|
found=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ "$found" == false ]]; then
|
||||||
|
msbuild_args[${#msbuild_args[*]}]="/bl:$log_dir/Build.binlog"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Capture MSBuild crash logs
|
# Capture MSBuild crash logs
|
||||||
export MSBUILDDEBUGPATH="$log_dir"
|
export MSBUILDDEBUGPATH="$log_dir"
|
||||||
|
|
||||||
# Import custom tools configuration, if present in the repo.
|
|
||||||
configure_toolset_script="$eng_root/configure-toolset.sh"
|
|
||||||
if [[ -a "$configure_toolset_script" ]]; then
|
|
||||||
. "$configure_toolset_script"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set this global property so Arcade will always initialize the toolset. The error message you get when you build on a clean machine
|
# Set this global property so Arcade will always initialize the toolset. The error message you get when you build on a clean machine
|
||||||
# with -norestore is not obvious about what to do to fix it. As initialization takes very little time, we think always initializing
|
# with -norestore is not obvious about what to do to fix it. As initialization takes very little time, we think always initializing
|
||||||
# the toolset is a better default behavior.
|
# the toolset is a better default behavior.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue