Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>2021-07-16 01:27:46 +0300
committerGitHub <noreply@github.com>2021-07-16 01:27:46 +0300
commite983168f871dcba090ff6ec08c0d2c7d4353fb8e (patch)
treea4e0f2f0212a0d4d613900212a2ce7c3979e92cd /eng/common/tools.ps1
parentbcb1042f809b8502fc5d7151efa5893207806ed8 (diff)
[main] Update dependencies from 8 repositories (#55636)
* Update dependencies from https://github.com/dotnet/arcade build 20210713.2 Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk From Version 6.0.0-beta.21359.3 -> To Version 6.0.0-beta.21363.2 * Update dependencies from https://github.com/dotnet/icu build 20210713.1 Microsoft.NETCore.Runtime.ICU.Transport From Version 6.0.0-preview.7.21362.1 -> To Version 6.0.0-preview.7.21363.1 * Update dependencies from https://github.com/dotnet/xharness build 20210713.1 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 1.0.0-prerelease.21357.4 -> To Version 1.0.0-prerelease.21363.1 * Update dependencies from https://github.com/mono/linker build 20210713.1 Microsoft.NET.ILLink.Tasks From Version 6.0.100-preview.6.21362.3 -> To Version 6.0.100-preview.6.21363.1 * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20210712.2 Microsoft.CodeAnalysis.NetAnalyzers From Version 6.0.0-rc1.21356.1 -> To Version 6.0.0-rc1.21362.2 * Update dependencies from https://github.com/dotnet/emsdk build 20210714.1 Microsoft.NET.Workload.Emscripten.Manifest-6.0.100 From Version 6.0.0-preview.7.21363.1 -> To Version 6.0.0-preview.7.21364.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210714.4 optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR From Version 1.0.0-prerelease.21362.2 -> To Version 1.0.0-prerelease.21364.4 * Update dependencies from https://github.com/dotnet/arcade build 20210714.3 Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk From Version 6.0.0-beta.21359.3 -> To Version 6.0.0-beta.21364.3 * Update dependencies from https://github.com/dotnet/xharness build 20210714.1 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 1.0.0-prerelease.21357.4 -> To Version 1.0.0-prerelease.21364.1 * Update dependencies from https://github.com/dotnet/hotreload-utils build 20210714.1 Microsoft.DotNet.HotReload.Utils.Generator.BuildTool From Version 1.0.1-alpha.0.21362.1 -> To Version 1.0.1-alpha.0.21364.1 * Revert linker change * Roll back the version Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Andy Gocke <angocke@microsoft.com> Co-authored-by: Larry Ewing <lewing@microsoft.com>
Diffstat (limited to 'eng/common/tools.ps1')
-rw-r--r--eng/common/tools.ps151
1 files changed, 51 insertions, 0 deletions
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 2df0909937d..5d526c74d51 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -106,6 +106,46 @@ function Exec-Process([string]$command, [string]$commandArgs) {
}
}
+# Take the given block, print it, print what the block probably references from the current set of
+# variables using low-effort string matching, then run the block.
+#
+# This is intended to replace the pattern of manually copy-pasting a command, wrapping it in quotes,
+# and printing it using "Write-Host". The copy-paste method is more readable in build logs, but less
+# maintainable and less reliable. It is easy to make a mistake and modify the command without
+# properly updating the "Write-Host" line, resulting in misleading build logs. The probability of
+# this mistake makes the pattern hard to trust when it shows up in build logs. Finding the bug in
+# existing source code can also be difficult, because the strings are not aligned to each other and
+# the line may be 300+ columns long.
+#
+# By removing the need to maintain two copies of the command, Exec-BlockVerbosely avoids the issues.
+#
+# In Bash (or any posix-like shell), "set -x" prints usable verbose output automatically.
+# "Set-PSDebug" appears to be similar at first glance, but unfortunately, it isn't very useful: it
+# doesn't print any info about the variables being used by the command, which is normally the
+# interesting part to diagnose.
+function Exec-BlockVerbosely([scriptblock] $block) {
+ Write-Host "--- Running script block:"
+ $blockString = $block.ToString().Trim()
+ Write-Host $blockString
+
+ Write-Host "--- List of variables that might be used:"
+ # For each variable x in the environment, check the block for a reference to x via simple "$x" or
+ # "@x" syntax. This doesn't detect other ways to reference variables ("${x}" nor "$variable:x",
+ # among others). It only catches what this function was originally written for: simple
+ # command-line commands.
+ $variableTable = Get-Variable |
+ Where-Object {
+ $blockString.Contains("`$$($_.Name)") -or $blockString.Contains("@$($_.Name)")
+ } |
+ Format-Table -AutoSize -HideTableHeaders -Wrap |
+ Out-String
+ Write-Host $variableTable.Trim()
+
+ Write-Host "--- Executing:"
+ & $block
+ Write-Host "--- Done running script block!"
+}
+
# createSdkLocationFile parameter enables a file being generated under the toolset directory
# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations
# as dot sourcing isn't possible.
@@ -632,6 +672,17 @@ function ExitWithExitCode([int] $exitCode) {
exit $exitCode
}
+# Check if $LASTEXITCODE is a nonzero exit code (NZEC). If so, print a Azure Pipeline error for
+# diagnostics, then exit the script with the $LASTEXITCODE.
+function Exit-IfNZEC([string] $category = "General") {
+ Write-Host "Exit code $LASTEXITCODE"
+ if ($LASTEXITCODE -ne 0) {
+ $message = "Last command failed with exit code $LASTEXITCODE."
+ Write-PipelineTelemetryError -Force -Category $category -Message $message
+ ExitWithExitCode $LASTEXITCODE
+ }
+}
+
function Stop-Processes() {
Write-Host 'Killing running build processes...'
foreach ($processName in $processesToStopOnExit) {