[macOS] Deprecate stale code, update structure accordingly (#11473)

This commit is contained in:
Erik Bershel
2025-01-27 14:09:51 +01:00
committed by GitHub
parent 19c847488e
commit 620ebdf37b
54 changed files with 105 additions and 3203 deletions

View File

@@ -13,10 +13,8 @@ Import-Module "$PSScriptRoot/SoftwareReport.Common.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Xcode.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Android.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Java.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Xamarin.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Toolcache.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Browsers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.WebServers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Helpers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1"
@@ -38,37 +36,16 @@ $languageAndRuntime.AddToolVersion("Bash", $(Get-BashVersion))
$languageAndRuntime.AddNodes($(Get-ClangLLVMVersions))
$languageAndRuntime.AddNodes($(Get-GccVersions))
$languageAndRuntime.AddNodes($(Get-FortranVersions))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$languageAndRuntime.AddToolVersion("Julia", $(Get-JuliaVersion))
}
$languageAndRuntime.AddToolVersion("Kotlin", $(Get-KotlinVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$languageAndRuntime.AddToolVersion("Go", $(Get-GoVersion))
}
if ((-not $os.IsSequoia)) {
$languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion))
}
$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$languageAndRuntime.AddToolVersion("MSBuild", $(Get-MSBuildVersion))
$languageAndRuntime.AddToolVersion("NVM", $(Get-NVMVersion))
$languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+')
}
$languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion))
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSequoiaArm64)) {
$languageAndRuntime.AddToolVersion("PHP", $(Get-PHPVersion))
}
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion))
}
$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$languageAndRuntime.AddToolVersion("R", $(Get-RVersion))
}
$languageAndRuntime.AddToolVersion("Ruby", $(Get-RubyVersion))
# Package Management
@@ -80,37 +57,23 @@ if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSeq
$packageManagement.AddToolVersion("Composer", $(Get-ComposerVersion))
}
$packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$packageManagement.AddToolVersion("Miniconda", $(Get-CondaVersion))
}
$packageManagement.AddToolVersion("NPM", $(Get-NPMVersion))
if ((-not $os.IsSequoia)) {
$packageManagement.AddToolVersion("NuGet", $(Get-NuGetVersion))
}
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$packageManagement.AddToolVersion("Pip", $(Get-PipVersion -Version 2))
}
$packageManagement.AddToolVersion("Pip3", $(Get-PipVersion -Version 3))
$packageManagement.AddToolVersion("Pip3", $(Get-Pip3Version))
$packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion))
$packageManagement.AddToolVersion("RubyGems", $(Get-RubyGemsVersion))
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$packageManagement.AddToolVersion("Vcpkg", $(Get-VcpkgVersion))
}
$packageManagement.AddToolVersion("Yarn", $(Get-YarnVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$packageManagement.AddNode($(Build-PackageManagementEnvironmentTable))
}
# Project Management
$projectManagement = $installedSoftware.AddHeader("Project Management")
$projectManagement.AddToolVersion("Apache Ant", $(Get-ApacheAntVersion))
$projectManagement.AddToolVersion("Apache Maven", $(Get-MavenVersion))
$projectManagement.AddToolVersion("Gradle", $(Get-GradleVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$projectManagement.AddToolVersion("Sbt", $(Get-SbtVersion))
}
# Utilities
$utilities = $installedSoftware.AddHeader("Utilities")
@@ -127,62 +90,26 @@ $utilities.AddToolVersion("GitHub CLI", $(Get-GitHubCLIVersion))
$utilities.AddToolVersion("GNU Tar", $(Get-GnuTarVersion))
$utilities.AddToolVersion("GNU Wget", $(Get-WgetVersion))
$utilities.AddToolVersion("gpg (GnuPG)", $(Get-GPGVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$utilities.AddToolVersion("ImageMagick", $(Get-ImageMagickVersion))
}
$utilities.AddToolVersion("jq", $(Get-JqVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$utilities.AddToolVersion("mongo", $(Get-MongoVersion))
$utilities.AddToolVersion("mongod", $(Get-MongodVersion))
}
$utilities.AddToolVersion("OpenSSL", $(Get-OpenSSLVersion))
$utilities.AddToolVersion("Packer", $(Get-PackerVersion))
$utilities.AddToolVersion("pkgconf", $(Get-PKGConfVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$utilities.AddToolVersion("PostgreSQL", $(Get-PostgresServerVersion))
$utilities.AddToolVersion("psql (PostgreSQL)", $(Get-PostgresClientVersion))
$utilities.AddToolVersion("Sox", $(Get-SoxVersion))
$utilities.AddToolVersion("Subversion (SVN)", $(Get-SVNVersion))
$utilities.AddToolVersion("Switchaudio-osx", $(Get-SwitchAudioOsxVersion))
}
if ($os.IsMonterey) {
$utilities.AddToolVersion("Vagrant", $(Get-VagrantVersion))
$utilities.AddToolVersion("VirtualBox", $(Get-VirtualBoxVersion))
}
$utilities.AddToolVersion("Unxip", $(Get-UnxipVersion))
$utilities.AddToolVersion("yq", $(Get-YqVersion))
$utilities.AddToolVersion("zstd", $(Get-ZstdVersion))
# Tools
$tools = $installedSoftware.AddHeader("Tools")
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$tools.AddToolVersion("App Center CLI", $(Get-AppCenterCLIVersion))
}
$tools.AddToolVersion("AWS CLI", $(Get-AWSCLIVersion))
$tools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMCLIVersion))
$tools.AddToolVersion("AWS Session Manager CLI", $(Get-AWSSessionManagerCLIVersion))
$tools.AddToolVersion("Azure CLI", $(Get-AzureCLIVersion))
$tools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
$tools.AddToolVersion("Bicep CLI", $(Get-BicepVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$tools.AddToolVersion("Cabal", $(Get-CabalVersion))
}
$tools.AddToolVersion("Cmake", $(Get-CmakeVersion))
$tools.AddToolVersion("CodeQL Action Bundle", $(Get-CodeQLBundleVersion))
if ($os.IsMonterey) {
$tools.AddToolVersion("Colima", $(Get-ColimaVersion))
}
$tools.AddToolVersion("Fastlane", $(Get-FastlaneVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$tools.AddToolVersion("GHC", $(Get-GHCVersion))
$tools.AddToolVersion("GHCup", $(Get-GHCupVersion))
$tools.AddToolVersion("Jazzy", $(Get-JazzyVersion))
$tools.AddToolVersion("Stack", $(Get-StackVersion))
}
$tools.AddToolVersion("SwiftFormat", $(Get-SwiftFormatVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$tools.AddToolVersion("Swig", $(Get-SwigVersion))
}
$tools.AddToolVersion("Xcbeautify", $(Get-XcbeautifyVersion))
$tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVersion))
$tools.AddToolVersion("Xcodes", $(Get-XcodesVersion))
@@ -192,9 +119,6 @@ $linters = $installedSoftware.AddHeader("Linters")
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSequoiaArm64)) {
$linters.AddToolVersion("SwiftLint", $(Get-SwiftLintVersion))
}
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$linters.AddToolVersion("Yamllint", $(Get-YamllintVersion))
}
# Browsers
$browsers = $installedSoftware.AddHeader("Browsers")
@@ -217,12 +141,6 @@ $rust.AddToolVersion("Rustdoc", $(Get-RustdocVersion))
$rust.AddToolVersion("Rustup", $(Get-RustupVersion))
$rustPackages = $rust.AddHeader("Packages")
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$rustPackages.AddToolVersion("Bindgen", $(Get-Bindgen))
$rustPackages.AddToolVersion("Cargo-audit", $(Get-Cargoaudit))
$rustPackages.AddToolVersion("Cargo-outdated", $(Get-Cargooutdated))
$rustPackages.AddToolVersion("Cbindgen", $(Get-Cbindgen))
}
$rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion))
$rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion))
@@ -233,33 +151,6 @@ $powerShell.AddToolVersion("PowerShell", $(Get-PowershellVersion))
$powerShellModules = $powerShell.AddHeader("PowerShell Modules")
$powerShellModules.AddNodes($(Get-PowerShellModules))
# Web Servers
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$webServers = $installedSoftware.AddHeader("Web Servers")
$webServers.AddTable($(Build-WebServersSection))
}
# Xamarin section
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$xamarin = $installedSoftware.AddHeader("Xamarin")
$vsForMac = $xamarin.AddHeader("Visual Studio for Mac")
$vsForMac.AddTable($(Build-VSMacTable))
$note =
@'
To use Visual Studio 2019 by default rename the app:
mv "/Applications/Visual Studio.app" "/Applications/Visual Studio 2022.app"
mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
'@
$vsForMacNotes = $vsForMac.AddHeader("Notes")
$vsForMacNotes.AddNote($note)
$xamarinBundles = $xamarin.AddHeader("Xamarin bundles")
$xamarinBundles.AddTable($(Build-XamarinTable))
$unitTestFramework = $xamarin.AddHeader("Unit Test Framework")
$unitTestFramework.AddToolVersion("NUnit", $(Get-NUnitVersion))
}
# Xcode section
$xcode = $installedSoftware.AddHeader("Xcode")
# First run doesn't provide full data about devices and runtimes
@@ -267,10 +158,6 @@ Get-XcodeInfoList | Out-Null
$xcodeInfo = Get-XcodeInfoList
$xcode.AddTable($(Build-XcodeTable $xcodeInfo))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) {
$xcodeTools = $xcode.AddHeader("Xcode Support Tools")
$xcodeTools.AddNodes($(Build-XcodeSupportToolsSection))
}
$installedSdks = $xcode.AddHeader("Installed SDKs")
$installedSdks.AddTable($(Build-XcodeSDKTable $xcodeInfo))
@@ -286,20 +173,12 @@ $android.AddTable($androidTable)
$androidEnv = $android.AddHeader("Environment variables")
$androidEnv.AddTable($(Build-AndroidEnvironmentTable))
if ($os.IsMonterey) {
$miscellaneous = $installedSoftware.AddHeader("Miscellaneous")
$miscellaneous.AddToolVersion("libXext", $(Get-LibXextVersion))
$miscellaneous.AddToolVersion("libXft", $(Get-LibXftVersion))
$miscellaneous.AddToolVersion("Tcl/Tk", $(Get-TclTkVersion))
$miscellaneous.AddToolVersion("Zlib", $(Get-ZlibVersion))
}
if ($os.IsSonoma -or $os.IsVentura) {
$miscellaneous = $installedSoftware.AddHeader("Miscellaneous")
$miscellaneous.AddToolVersion("Tcl/Tk", $(Get-TclTkVersion))
}
if ($os.IsMonterey -or $os.IsSonomaX64 -or $os.IsVenturaX64) {
if ($os.IsSonomaX64 -or $os.IsVenturaX64) {
Write-Host "Adding environment variables for parallels"

View File

@@ -10,20 +10,6 @@ function Get-DotnetVersionList {
return $sdkRawList | ForEach-Object { Take-Part $_ -Part 0 }
}
function Get-GoVersion {
$goOutput = Run-Command "go version" | Take-Part -Part 2
if ($goOutput.StartsWith("go")) {
$goOutput = $goOutput.Substring(2)
}
return $goOutput
}
function Get-RVersion {
$rVersion = Run-Command "R --version | grep 'R version'" | Take-Part -Part 2
return $rVersion
}
function Get-RustVersion {
$rustVersion = Run-Command "rustc --version" | Take-Part -Part 1
return $rustVersion
@@ -49,26 +35,6 @@ function Get-RustClippyVersion {
return $version
}
function Get-Bindgen {
$bindgenVersion = Run-Command "bindgen --version" | Take-Part -Part 1
return $bindgenVersion
}
function Get-Cbindgen {
$cbindgenVersion = Run-Command "cbindgen --version" | Take-Part -Part 1
return $cbindgenVersion
}
function Get-Cargooutdated {
$cargoOutdatedVersion = Run-Command "cargo outdated --version" | Take-Part -Part 1
return $cargoOutdatedVersion
}
function Get-Cargoaudit {
$cargoAuditVersion = Run-Command "cargo-audit --version" | Take-Part -Part 1
return $cargoAuditVersion
}
function Get-RustupVersion {
$rustupVersion = Run-Command "rustup --version" | Select-Object -First 1 | Take-Part -Part 1
return $rustupVersion
@@ -114,20 +80,8 @@ function Get-ClangLLVMVersions {
)
}
function Get-NVMVersion {
$nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh"
$nvmInitCommand = ". ${nvmPath} > /dev/null 2>&1 || true"
$nodejsVersion = Run-Command "${nvmInitCommand} && nvm --version"
return $nodejsVersion
}
function Get-PipVersion {
param (
[Parameter(Mandatory)][ValidateRange(2, 3)]
[int] $Version
)
$command = If ($Version -eq 2) { "/Library/Frameworks/Python.framework/Versions/2.7/bin/pip --version" } Else { "pip3 --version" }
function Get-Pip3Version {
$command = "pip3 --version"
$commandOutput = Run-Command $command
$versionPart1 = $commandOutput | Take-Part -Part 1
$versionPart2 = $commandOutput | Take-Part -Part 4
@@ -140,14 +94,6 @@ function Get-PipxVersion {
return $pipxVersion
}
function Get-NVMNodeVersionList {
$nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh"
$nvmInitCommand = ". ${nvmPath} > /dev/null 2>&1 || true"
$nodejsVersionsRaw = Run-Command "${nvmInitCommand} && nvm ls"
$nodeVersions = $nodejsVersionsRaw | ForEach-Object { $_.TrimStart(" ").TrimEnd(" *") } | Where-Object { $_.StartsWith("v") }
return $nodeVersions | ForEach-Object { $_.TrimStart("v") }
}
function Build-OSInfoSection {
param (
[string] $ImageName
@@ -173,12 +119,6 @@ function Get-MonoVersion {
return $monoVersion
}
function Get-MSBuildVersion {
$msbuildVersion = Run-Command "msbuild -version" | Select-Object -Last 1
$monoVersion = Get-MonoVersion
return "$msbuildVersion (Mono $monoVersion)"
}
function Get-NodeVersion {
$nodeVersion = Run-Command "node --version"
return $nodeVersion.TrimStart("v")
@@ -189,11 +129,6 @@ function Get-PerlVersion {
return $version
}
function Get-PythonVersion {
$pythonVersion = Run-Command "/Library/Frameworks/Python.framework/Versions/2.7/bin/python --version"
return ($pythonVersion -replace "^Python").Trim()
}
function Get-Python3Version {
$python3Version = Run-Command "python3 --version"
return ($python3Version -replace "^Python").Trim()
@@ -209,11 +144,6 @@ function Get-PHPVersion {
return ($PHPVersion -replace "^PHP").Trim()
}
function Get-JuliaVersion {
$juliaVersion = Run-Command "julia --version" | Take-Part -Part 0,2
return ($juliaVersion -replace "^Julia").Trim()
}
function Get-BundlerVersion {
$bundlerVersion = Run-Command "bundle --version"
return ($bundlerVersion -replace "^Bundler version").Trim()
@@ -249,11 +179,6 @@ function Get-NuGetVersion {
return $nugetVersion
}
function Get-CondaVersion {
$condaVersion = Run-Command "conda --version"
return ($condaVersion -replace "^conda").Trim()
}
function Get-RubyGemsVersion {
$rubyGemsVersion = Run-Command "gem --version"
return $rubyGemsVersion
@@ -305,11 +230,6 @@ function Get-WgetVersion {
return $wgetVersion
}
function Get-SVNVersion {
$svnVersion = Run-Command "svn --version --quiet"
return $svnVersion
}
function Get-PackerVersion {
# Packer 1.7.1 has a bug and outputs version to stderr instead of stdout https://github.com/hashicorp/packer/issues/10855
$result = Run-Command "packer --version"
@@ -332,16 +252,6 @@ function Get-GPGVersion {
return ($gpgVersion.Line -replace "^gpg \(GnuPG\)").Trim()
}
function Get-PostgresClientVersion {
$postgresClientVersion = Run-Command "psql --version"
return ($postgresClientVersion -replace "^psql \(PostgreSQL\)").Trim()
}
function Get-PostgresServerVersion {
$postgresServerVersion = Run-Command "pg_config --version"
return ($postgresServerVersion -replace "^PostgreSQL").Trim()
}
function Get-Aria2Version {
$aria2Version = Run-Command "aria2c --version" | Select-Object -First 1 | Take-Part -Part 2
return $aria2Version
@@ -367,16 +277,6 @@ function Get-BazeliskVersion {
return ($bazeliskVersion -replace "^bazelisk").Trim()
}
function Get-MongoVersion {
$mongo = Run-Command "mongo --version" | Select-String "MongoDB shell version" | Take-Part -Part 3
return $mongo.TrimStart("v").Trim()
}
function Get-MongodVersion {
$mongod = Run-Command "mongod --version" | Select-String "db version " | Take-Part -Part 2
return $mongod.TrimStart("v").Trim()
}
function Get-7zipVersion {
$7zip = Run-Command "7z i" | Select-String "7-Zip" | Take-Part -Part 0,2
return ($7zip -replace "^7-Zip").Trim()
@@ -392,16 +292,6 @@ function Get-BsdtarVersion {
return "$bsdtar - available by 'tar' alias"
}
function Get-VirtualBoxVersion {
$virtualBox = Run-Command "vboxmanage -v"
return $virtualBox
}
function Get-VagrantVersion {
$vagrant = Run-Command "vagrant -v"
return ($vagrant -replace "^Vagrant").Trim()
}
function Get-ParallelVersion {
$parallelVersion = Run-Command "parallel --version" | Select-String "GNU parallel" | Select-Object -First 1
return ($parallelVersion -replace "^GNU parallel").Trim()
@@ -417,11 +307,6 @@ function Get-CmakeVersion {
return $cmakeVersion
}
function Get-AppCenterCLIVersion {
$appcenterCLIVersion = Run-Command "appcenter --version" | Take-Part -Part 2
return $appcenterCLIVersion
}
function Get-AzureCLIVersion {
$azureCLIVersion = (az version | ConvertFrom-Json).'azure-cli'
return $azureCLIVersion
@@ -447,46 +332,11 @@ function Get-AWSSessionManagerCLIVersion {
return $awsSessionManagerVersion
}
function Get-GHCupVersion {
$ghcUpVersion = (Run-Command "ghcup --version" | Take-Part -Part 5).Replace('v','')
return $ghcUpVersion
}
function Get-GHCVersion {
$ghcVersion = Run-Command "ghc --version" | Take-Part -Part 7
return $ghcVersion
}
function Get-CabalVersion {
$cabalVersion = Run-Command "cabal --version" | Take-Part -Part 3
return $cabalVersion
}
function Get-SwitchAudioOsxVersion {
$switchAudioVersion = Get-BrewPackageVersion -CommandName "SwitchAudioSource"
return $switchAudioVersion
}
function Get-SoxVersion {
$soxVersion = Get-BrewPackageVersion -CommandName "sox"
return $soxVersion
}
function Get-StackVersion {
$stackVersion = Run-Command "stack --version" | Take-Part -Part 1 | ForEach-Object {$_.replace(",","")}
return $stackVersion
}
function Get-SwiftFormatVersion {
$swiftFormatVersion = Run-Command "swiftformat --version"
return $swiftFormatVersion
}
function Get-YamllintVersion {
$yamllintVersion = Run-Command "yamllint --version"
return ($yamllintVersion -replace "^Yamllint").Trim()
}
function Get-SwiftLintVersion {
$swiftlintVersion = Run-Command "swiftlint version"
return $swiftlintVersion
@@ -497,11 +347,6 @@ function Get-PowershellVersion {
return ($powershellVersion -replace "^PowerShell").Trim()
}
function Get-SwigVersion {
$swigVersion = Run-Command "swig -version" | Select-Object -First 2 | Take-Part -Part 2
return $swigVersion
}
function Get-BicepVersion {
$bicepVersion = Run-Command "bicep --version" | Take-Part -Part 3
return $bicepVersion
@@ -512,31 +357,6 @@ function Get-KotlinVersion {
return $kotlinVersion
}
function Get-SbtVersion {
$sbtVersion = Run-Command "sbt -version" | Take-Part -Part 3
return $sbtVersion
}
function Get-JazzyVersion {
$jazzyVersion = Run-Command "jazzy --version" | Take-Part -Part 2
return $jazzyVersion
}
function Get-ZlibVersion {
$zlibVersion = (Run-Command "brew info --json zlib" | ConvertFrom-Json).installed.version
return $zlibVersion
}
function Get-LibXftVersion {
$libXftVersion = (Run-Command "brew info --json libxft" | ConvertFrom-Json).installed.version
return $libXftVersion
}
function Get-LibXextVersion {
$libXextVersion = (Run-Command "brew info --json libxext" | ConvertFrom-Json).installed.version
return $libXextVersion
}
function Get-TclTkVersion {
$tcltkVersion = (Run-Command "brew info --json tcl-tk@8" | ConvertFrom-Json).installed.version
return $tcltkVersion
@@ -548,35 +368,6 @@ function Get-YqVersion {
return ($Matches[0])
}
function Get-ImageMagickVersion {
$imagemagickVersion = Run-Command "magick --version" | Select-Object -First 1 | Take-Part -Part 1,2
return ($imagemagickVersion -replace "^ImageMagick").Trim()
}
function Build-PackageManagementEnvironmentTable {
$node = [HeaderNode]::new("Environment variables")
$table = @(
@{
"Name" = "CONDA"
"Value" = $env:CONDA
},
@{
"Name" = "VCPKG_INSTALLATION_ROOT"
"Value" = $env:VCPKG_INSTALLATION_ROOT
}
) | ForEach-Object {
[PSCustomObject] @{
"Name" = $_.Name
"Value" = $_.Value
}
}
$node.AddTable($table)
return $node
}
function Build-MiscellaneousEnvironmentTable {
return @(
@{
@@ -591,7 +382,6 @@ function Build-MiscellaneousEnvironmentTable {
}
}
function Get-CodeQLBundleVersion {
$CodeQLVersionWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
$CodeQLVersionPath = Get-ChildItem $CodeQLVersionWildcard | Select-Object -First 1 -Expand FullName
@@ -600,11 +390,6 @@ function Get-CodeQLBundleVersion {
return $CodeQLVersion
}
function Get-ColimaVersion {
$colimaVersion = Run-Command "colima version" | Select-String "colima version" | Take-Part -Part 2
return $colimaVersion
}
function Get-PKGConfVersion {
$pkgconfVersion = Run-Command "pkgconf --version"
return $pkgconfVersion

View File

@@ -1,36 +0,0 @@
function Get-ApacheVersion {
$name = "httpd"
$port = 80
$version = brew list $name --versions | Take-Part -Part 1
$serviceStatus = (brew services list) -match $name | Take-Part -Part 1
$configFile = "$(brew --prefix)/etc/httpd/httpd.conf"
return [PsCustomObject]@{
"Name" = $name
"Version" = $version
"ConfigFile" = $configFile
"ServiceStatus" = $serviceStatus
"ListenPort" = $port
}
}
function Get-NginxVersion {
$name = "nginx"
$port = 80
$version = brew list $name --versions | Take-Part -Part 1
$serviceStatus = (brew services list) -match $name | Take-Part -Part 1
$configFile = "$(brew --prefix)/etc/nginx/nginx.conf"
return [PsCustomObject]@{
"Name" = $name
"Version" = $version
"ConfigFile" = $configFile
"ServiceStatus" = $serviceStatus
"ListenPort" = $port
}
}
function Build-WebServersSection {
return @(
(Get-ApacheVersion),
(Get-NginxVersion)
)
}

View File

@@ -1,48 +0,0 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
function Build-VSMacTable {
$vsMacVersions = (Get-ToolsetContent).xamarin.vsmac.versions
$defaultVSMacVersion = (Get-ToolsetContent).xamarin.vsmac.default
return $vsMacVersions | ForEach-Object {
$isDefault = $_ -eq $defaultVSMacVersion
$vsPath = "/Applications/Visual Studio $_.app"
if ($isDefault) {
$vsPath = "/Applications/Visual Studio.app"
}
$plistPath = "$vsPath/Contents/Info.plist"
$build = Run-Command "/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' '$plistPath'"
$defaultPostfix = $isDefault ? " (default)" : ""
[PSCustomObject] @{
"Version" = $_ + $defaultPostfix
"Build" = $build
"Path" = $vsPath
}
}
}
function Get-NUnitVersion {
$version = Run-Command "nunit3-console --version" | Select-Object -First 1 | Take-Part -Part 3
return $version
}
function Build-XamarinTable {
$xamarinBundles = (Get-ToolsetContent).xamarin.bundles
$defaultSymlink = (Get-ToolsetContent).xamarin.bundle_default
if ($defaultSymlink -eq "latest") {
$defaultSymlink = $xamarinBundles[0].symlink
}
return $xamarinBundles | ForEach-Object {
$defaultPostfix = ($_.symlink -eq $defaultSymlink ) ? " (default)" : ""
[PSCustomObject] @{
"symlink" = $_.symlink + $defaultPostfix
"Xamarin.Mono" = $_.mono
"Xamarin.iOS" = $_.ios
"Xamarin.Mac" = $_.mac
"Xamarin.Android" = $_.android
}
}
}

View File

@@ -72,6 +72,8 @@ function Get-XcodePlatformOrder {
"Simulator - tvOS" { 5 }
"watchOS" { 6 }
"Simulator - watchOS" { 7 }
"visionOS" { 8 }
"Simulator - visionOS" { 9 }
Default { 100 }
}
}
@@ -237,22 +239,3 @@ function Build-XcodeSimulatorsTable {
return [System.Version]::Parse($sdkNameParts[-1])
}
}
function Build-XcodeSupportToolsSection {
$toolNodes = @()
$xcpretty = Run-Command "xcpretty --version"
$xcversion = Run-Command "xcversion --version" | Select-String "^[0-9]"
$toolNodes += [ToolVersionNode]::new("xcpretty", $xcpretty)
if ($os.IsMonterey) {
$toolNodes += [ToolVersionNode]::new("xcversion", $xcversion)
}
$nomadOutput = Run-Command "gem list nomad-cli"
$nomadCLI = [regex]::matches($nomadOutput, "(\d+.){2}\d+").Value
$nomadShenzhenOutput = Run-Command "ipa -version"
$nomadShenzhen = [regex]::matches($nomadShenzhenOutput, "(\d+.){2}\d+").Value
return $toolNodes
}