forked from UbiquityDotNET/Ubiquity.NET.Versioning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShow-FullBuildInfo.ps1
More file actions
34 lines (27 loc) · 1.23 KB
/
Copy pathShow-FullBuildInfo.ps1
File metadata and controls
34 lines (27 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function Show-FullBuildInfo
{
<#
.SYNOPSIS
Displays details of the build information and environment to the information and verbose streams
.PARAMETER buildInfo
The build information Hashtable for the build. This normally contains the standard and repo specific
properties so that the full details are available in logs.
.DESCRIPTION
This function displays all the properties of the buildinfo to the information stream. Additionally,
details of the current PATH, the .NET SDKs and runtimes installed is logged to the Verbose stream.
#>
Param($buildInfo)
Write-Information 'Build Info:'
Write-Information ($buildInfo | Format-Table | Out-String)
Write-Information "BuildKind: $($buildInfo['CurrentBuildKind'])"
Write-Information "CiBuildName: $env:CiBuildName"
Write-Information "env: Is*"
Write-Information (dir env:Is* | Format-Table -Property Name, value | Out-String)
# This sort of detail is really only needed when solving problems with a runner
Write-Verbose 'PATH:'
$($env:Path -split ';') | %{ Write-Verbose $_ }
Write-Verbose ".NET Runtimes:"
Write-Verbose (dotnet --list-runtimes | Out-String)
Write-Verbose ".NET SDKs:"
Write-Verbose (dotnet --list-sdks | Out-String)
}