Implement new software report generator for macOS (#6690)

* Create environmentVariables.yml

* Update environmentVariables.yml

* Delete environmentVariables.yml

* Add new SoftwareReport generator

* Output generation fixes after review

* Add json output print in pipeline

* Modify json output print in pipeline

* Removed redundant space character
This commit is contained in:
bogdan-damian-bgd
2022-12-06 18:16:20 +01:00
committed by GitHub
parent fb3b6fd699
commit 69cdead4fc
10 changed files with 763 additions and 433 deletions

View File

@@ -78,7 +78,7 @@ function Get-XcodePlatformOrder {
function Get-XcodeCommandLineToolsVersion {
$xcodeCommandLineToolsVersion = Run-Command "pkgutil --pkg-info com.apple.pkg.CLTools_Executables" | Select -Index 1 | Take-Part -Part 1
return "Xcode Command Line Tools $xcodeCommandLineToolsVersion"
return $xcodeCommandLineToolsVersion
}
function Build-XcodeTable {
@@ -226,13 +226,13 @@ function Build-XcodeSimulatorsTable {
}
function Build-XcodeSupportToolsSection {
$toolNodes = @()
$xcpretty = Run-Command "xcpretty --version"
$xcversion = Run-Command "xcversion --version" | Select-String "^[0-9]"
$toolList = @(
"xcpretty $xcpretty",
"xcversion $xcversion"
)
$toolNodes += [ToolNode]::new("xcpretty", $xcpretty)
$toolNodes += [ToolNode]::new("xcversion", $xcversion)
$nomadOutput = Run-Command "gem list nomad-cli"
$nomadCLI = [regex]::matches($nomadOutput, "(\d+.){2}\d+").Value
@@ -240,14 +240,9 @@ function Build-XcodeSupportToolsSection {
$nomadShenzhen = [regex]::matches($nomadShenzhenOutput, "(\d+.){2}\d+").Value
if ($os.IsLessThanMonterey) {
$toolList += @(
"Nomad CLI $nomadCLI",
"Nomad shenzhen CLI $nomadShenzhen"
)
$toolNodes += [ToolNode]::new("Nomad CLI", $nomadCLI)
$toolNodes += [ToolNode]::new("Nomad shenzhen CLI", $nomadShenzhen)
}
$output = ""
$output += New-MDHeader "Xcode Support Tools" -Level 4
$output += New-MDList -Style Unordered -Lines $toolList
return $output
return $toolNodes
}