mirror of
https://github.com/actions/runner-images.git
synced 2025-12-10 11:07:02 +00:00
[macOS] Implement new directories hierarchy (#8741)
This commit is contained in:
committed by
GitHub
parent
5d40b1e213
commit
8d6a01b370
@@ -13,7 +13,7 @@ function Enable-AutoLogon {
|
|||||||
[string] $Password
|
[string] $Password
|
||||||
)
|
)
|
||||||
|
|
||||||
$url = "https://raw.githubusercontent.com/actions/runner-images/main/images/macos/provision/bootstrap-provisioner/setAutoLogin.sh"
|
$url = "https://raw.githubusercontent.com/actions/runner-images/main/images/macos/assets/bootstrap-provisioner/setAutoLogin.sh"
|
||||||
$script = Invoke-RestMethod -Uri $url
|
$script = Invoke-RestMethod -Uri $url
|
||||||
$base64 = [Convert]::ToBase64String($script.ToCharArray())
|
$base64 = [Convert]::ToBase64String($script.ToCharArray())
|
||||||
$command = "echo $base64 | base64 --decode > ./setAutoLogin.sh;sudo bash ./setAutoLogin.sh '${UserName}' '${Password}';rm ./setAutoLogin.sh"
|
$command = "echo $base64 | base64 --decode > ./setAutoLogin.sh;sudo bash ./setAutoLogin.sh '${UserName}' '${Password}';rm ./setAutoLogin.sh"
|
||||||
@@ -43,7 +43,7 @@ function Invoke-SoftwareUpdateArm64 {
|
|||||||
'14.\d' { $nextOSVersion = 'NotYetDefined' }
|
'14.\d' { $nextOSVersion = 'NotYetDefined' }
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = "https://raw.githubusercontent.com/actions/runner-images/main/images/macos/provision/configuration/auto-software-update-arm64.exp"
|
$url = "https://raw.githubusercontent.com/actions/runner-images/main/images/macos/assets/auto-software-update-arm64.exp"
|
||||||
$script = Invoke-RestMethod -Uri $url
|
$script = Invoke-RestMethod -Uri $url
|
||||||
foreach ($update in $listOfUpdates) {
|
foreach ($update in $listOfUpdates) {
|
||||||
if ($update -notmatch "$nextOSVersion") {
|
if ($update -notmatch "$nextOSVersion") {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function Validate-Scripts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$PathUbuntu = "./images/ubuntu/scripts"
|
$PathUbuntu = "./images/ubuntu/scripts"
|
||||||
$PathMacOS = "./images/macos/provision"
|
$PathMacOS = "./images/macos"
|
||||||
$PatternUbuntu = "#!/bin/bash -e"
|
$PatternUbuntu = "#!/bin/bash -e"
|
||||||
$PatternMacOS = "#!/bin/bash -e -o pipefail"
|
$PatternMacOS = "#!/bin/bash -e -o pipefail"
|
||||||
$ScriptsWithBrokenShebang = @()
|
$ScriptsWithBrokenShebang = @()
|
||||||
|
|||||||
0
images/macos/provision/bootstrap-provisioner/change_password → images/macos/assets/bootstrap-provisioner/change_password
Executable file → Normal file
0
images/macos/provision/bootstrap-provisioner/change_password → images/macos/assets/bootstrap-provisioner/change_password
Executable file → Normal file
0
images/macos/provision/bootstrap-provisioner/kcpassword.py → images/macos/assets/bootstrap-provisioner/kcpassword.py
Executable file → Normal file
0
images/macos/provision/bootstrap-provisioner/kcpassword.py → images/macos/assets/bootstrap-provisioner/kcpassword.py
Executable file → Normal file
0
images/macos/provision/core/action-archive-cache.sh → images/macos/scripts/build/action-archive-cache.sh
Executable file → Normal file
0
images/macos/provision/core/action-archive-cache.sh → images/macos/scripts/build/action-archive-cache.sh
Executable file → Normal file
0
images/macos/provision/core/android-toolsets.sh → images/macos/scripts/build/android-toolsets.sh
Executable file → Normal file
0
images/macos/provision/core/android-toolsets.sh → images/macos/scripts/build/android-toolsets.sh
Executable file → Normal file
0
images/macos/provision/configuration/autologin.sh → images/macos/scripts/build/autologin.sh
Executable file → Normal file
0
images/macos/provision/configuration/autologin.sh → images/macos/scripts/build/autologin.sh
Executable file → Normal file
0
images/macos/provision/core/azcopy.sh → images/macos/scripts/build/azcopy.sh
Executable file → Normal file
0
images/macos/provision/core/azcopy.sh → images/macos/scripts/build/azcopy.sh
Executable file → Normal file
0
images/macos/provision/core/cocoapods.sh → images/macos/scripts/build/cocoapods.sh
Executable file → Normal file
0
images/macos/provision/core/cocoapods.sh → images/macos/scripts/build/cocoapods.sh
Executable file → Normal file
0
images/macos/provision/configuration/configure-ssh.sh → images/macos/scripts/build/configure-ssh.sh
Executable file → Normal file
0
images/macos/provision/configuration/configure-ssh.sh → images/macos/scripts/build/configure-ssh.sh
Executable file → Normal file
0
images/macos/provision/configuration/disable-auto-updates.sh → images/macos/scripts/build/disable-auto-updates.sh
Executable file → Normal file
0
images/macos/provision/configuration/disable-auto-updates.sh → images/macos/scripts/build/disable-auto-updates.sh
Executable file → Normal file
0
images/macos/provision/core/dotnet.sh → images/macos/scripts/build/dotnet.sh
Executable file → Normal file
0
images/macos/provision/core/dotnet.sh → images/macos/scripts/build/dotnet.sh
Executable file → Normal file
0
images/macos/provision/core/homebrew.sh → images/macos/scripts/build/homebrew.sh
Executable file → Normal file
0
images/macos/provision/core/homebrew.sh → images/macos/scripts/build/homebrew.sh
Executable file → Normal file
0
images/macos/provision/configuration/max-files.sh → images/macos/scripts/build/max-files.sh
Executable file → Normal file
0
images/macos/provision/configuration/max-files.sh → images/macos/scripts/build/max-files.sh
Executable file → Normal file
0
images/macos/provision/configuration/ntpconf.sh → images/macos/scripts/build/ntpconf.sh
Executable file → Normal file
0
images/macos/provision/configuration/ntpconf.sh → images/macos/scripts/build/ntpconf.sh
Executable file → Normal file
0
images/macos/provision/core/nvm.sh → images/macos/scripts/build/nvm.sh
Executable file → Normal file
0
images/macos/provision/core/nvm.sh → images/macos/scripts/build/nvm.sh
Executable file → Normal file
0
images/macos/provision/core/openjdk.sh → images/macos/scripts/build/openjdk.sh
Executable file → Normal file
0
images/macos/provision/core/openjdk.sh → images/macos/scripts/build/openjdk.sh
Executable file → Normal file
0
images/macos/provision/core/openssl.sh → images/macos/scripts/build/openssl.sh
Executable file → Normal file
0
images/macos/provision/core/openssl.sh → images/macos/scripts/build/openssl.sh
Executable file → Normal file
0
images/macos/provision/core/python.sh → images/macos/scripts/build/python.sh
Executable file → Normal file
0
images/macos/provision/core/python.sh → images/macos/scripts/build/python.sh
Executable file → Normal file
0
images/macos/provision/core/ruby.sh → images/macos/scripts/build/ruby.sh
Executable file → Normal file
0
images/macos/provision/core/ruby.sh → images/macos/scripts/build/ruby.sh
Executable file → Normal file
0
images/macos/provision/core/rubygem.sh → images/macos/scripts/build/rubygem.sh
Executable file → Normal file
0
images/macos/provision/core/rubygem.sh → images/macos/scripts/build/rubygem.sh
Executable file → Normal file
0
images/macos/provision/configuration/screensaver-off.sh → images/macos/scripts/build/screensaver-off.sh
Executable file → Normal file
0
images/macos/provision/configuration/screensaver-off.sh → images/macos/scripts/build/screensaver-off.sh
Executable file → Normal file
@@ -1,58 +1,58 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
## File: toolset.ps1
|
## File: toolset.ps1
|
||||||
## Team: CI-Build
|
## Team: CI-Build
|
||||||
## Desc: Install toolset
|
## Desc: Install toolset
|
||||||
################################################################################
|
################################################################################
|
||||||
Import-Module "~/image-generation/helpers/Tests.Helpers.psm1"
|
Import-Module "~/image-generation/helpers/Tests.Helpers.psm1"
|
||||||
Import-Module "~/image-generation/helpers/Common.Helpers.psm1"
|
Import-Module "~/image-generation/helpers/Common.Helpers.psm1"
|
||||||
|
|
||||||
Function Install-Asset {
|
Function Install-Asset {
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[object] $ReleaseAsset
|
[object] $ReleaseAsset
|
||||||
)
|
)
|
||||||
|
|
||||||
$assetFolderPath = Join-Path "/tmp" "$($ReleaseAsset.filename)-temp-dir"
|
$assetFolderPath = Join-Path "/tmp" "$($ReleaseAsset.filename)-temp-dir"
|
||||||
New-Item -ItemType Directory -Path $assetFolderPath | Out-Null
|
New-Item -ItemType Directory -Path $assetFolderPath | Out-Null
|
||||||
$assetArchivePath = Join-Path $assetFolderPath $ReleaseAsset.filename
|
$assetArchivePath = Join-Path $assetFolderPath $ReleaseAsset.filename
|
||||||
|
|
||||||
Write-Host "Download $($ReleaseAsset.filename) archive to the $assetFolderPath folder..."
|
Write-Host "Download $($ReleaseAsset.filename) archive to the $assetFolderPath folder..."
|
||||||
Start-DownloadWithRetry -Url $ReleaseAsset.download_url -DownloadPath $assetFolderPath
|
Start-DownloadWithRetry -Url $ReleaseAsset.download_url -DownloadPath $assetFolderPath
|
||||||
|
|
||||||
Write-Host "Extract $($ReleaseAsset.filename) content..."
|
Write-Host "Extract $($ReleaseAsset.filename) content..."
|
||||||
tar -xzf $assetArchivePath -C $assetFolderPath
|
tar -xzf $assetArchivePath -C $assetFolderPath
|
||||||
|
|
||||||
Write-Host "Invoke installation script..."
|
Write-Host "Invoke installation script..."
|
||||||
Push-Location -Path $assetFolderPath
|
Push-Location -Path $assetFolderPath
|
||||||
Invoke-Expression "bash ./setup.sh"
|
Invoke-Expression "bash ./setup.sh"
|
||||||
Pop-Location
|
Pop-Location
|
||||||
}
|
}
|
||||||
|
|
||||||
$arch = Get-Architecture
|
$arch = Get-Architecture
|
||||||
|
|
||||||
# Get toolcache content from toolset
|
# Get toolcache content from toolset
|
||||||
$toolsToInstall = @("Python", "Node", "Go")
|
$toolsToInstall = @("Python", "Node", "Go")
|
||||||
$tools = Get-ToolsetValue "toolcache" | Where-Object {$toolsToInstall -contains $_.Name}
|
$tools = Get-ToolsetValue "toolcache" | Where-Object {$toolsToInstall -contains $_.Name}
|
||||||
|
|
||||||
foreach ($tool in $tools) {
|
foreach ($tool in $tools) {
|
||||||
# Get versions manifest for current tool
|
# Get versions manifest for current tool
|
||||||
$assets = Invoke-RestMethodWithRetry -Url $tool.url
|
$assets = Invoke-RestMethodWithRetry -Url $tool.url
|
||||||
|
|
||||||
# Get github release asset for each version
|
# Get github release asset for each version
|
||||||
foreach ($version in $tool.arch.$arch.versions) {
|
foreach ($version in $tool.arch.$arch.versions) {
|
||||||
$asset = $assets | Where-Object version -like $version `
|
$asset = $assets | Where-Object version -like $version `
|
||||||
| Select-Object -ExpandProperty files `
|
| Select-Object -ExpandProperty files `
|
||||||
| Where-Object { ($_.platform -eq $tool.platform) -and ($_.arch -eq $arch)} `
|
| Where-Object { ($_.platform -eq $tool.platform) -and ($_.arch -eq $arch)} `
|
||||||
| Select-Object -First 1
|
| Select-Object -First 1
|
||||||
|
|
||||||
Write-Host "Installing $($tool.name) $version..."
|
Write-Host "Installing $($tool.name) $version..."
|
||||||
if ($null -ne $asset) {
|
if ($null -ne $asset) {
|
||||||
Install-Asset -ReleaseAsset $asset
|
Install-Asset -ReleaseAsset $asset
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Asset was not found in versions manifest"
|
Write-Host "Asset was not found in versions manifest"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoke-PesterTests "Toolcache"
|
Invoke-PesterTests "Toolcache"
|
||||||
0
images/macos/provision/core/xamarin.sh → images/macos/scripts/build/xamarin.sh
Executable file → Normal file
0
images/macos/provision/core/xamarin.sh → images/macos/scripts/build/xamarin.sh
Executable file → Normal file
0
images/macos/provision/core/xcode-sims.sh → images/macos/scripts/build/xcode-sims.sh
Executable file → Normal file
0
images/macos/provision/core/xcode-sims.sh → images/macos/scripts/build/xcode-sims.sh
Executable file → Normal file
@@ -1,319 +1,319 @@
|
|||||||
using module ./software-report-base/SoftwareReport.psm1
|
using module ./software-report-base/SoftwareReport.psm1
|
||||||
using module ./software-report-base/SoftwareReport.Nodes.psm1
|
using module ./software-report-base/SoftwareReport.Nodes.psm1
|
||||||
|
|
||||||
param (
|
param (
|
||||||
[Parameter(Mandatory)][string]
|
[Parameter(Mandatory)][string]
|
||||||
$OutputDirectory,
|
$OutputDirectory,
|
||||||
$ImageName
|
$ImageName
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
Import-Module "$PSScriptRoot/SoftwareReport.Common.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/SoftwareReport.Common.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/SoftwareReport.Xcode.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/SoftwareReport.Xcode.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/SoftwareReport.Android.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/SoftwareReport.Android.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/SoftwareReport.Java.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/SoftwareReport.Java.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/SoftwareReport.Xamarin.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/SoftwareReport.Xamarin.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/SoftwareReport.Toolcache.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/SoftwareReport.Toolcache.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/SoftwareReport.Browsers.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/SoftwareReport.Browsers.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/SoftwareReport.WebServers.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/SoftwareReport.WebServers.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1"
|
Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1"
|
||||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||||
Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1"
|
Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1"
|
||||||
|
|
||||||
# Operating System info
|
# Operating System info
|
||||||
$os = Get-OSVersion
|
$os = Get-OSVersion
|
||||||
|
|
||||||
# OS info
|
# OS info
|
||||||
$osInfo = Build-OSInfoSection $ImageName
|
$osInfo = Build-OSInfoSection $ImageName
|
||||||
|
|
||||||
# Software report
|
# Software report
|
||||||
$softwareReport = [SoftwareReport]::new($osInfo)
|
$softwareReport = [SoftwareReport]::new($osInfo)
|
||||||
$installedSoftware = $softwareReport.Root.AddHeader("Installed Software")
|
$installedSoftware = $softwareReport.Root.AddHeader("Installed Software")
|
||||||
|
|
||||||
# Language and Runtime
|
# Language and Runtime
|
||||||
$languageAndRuntime = $installedSoftware.AddHeader("Language and Runtime")
|
$languageAndRuntime = $installedSoftware.AddHeader("Language and Runtime")
|
||||||
$languageAndRuntime.AddToolVersionsListInline(".NET Core SDK", $(Get-DotnetVersionList), '^\d+\.\d+\.\d')
|
$languageAndRuntime.AddToolVersionsListInline(".NET Core SDK", $(Get-DotnetVersionList), '^\d+\.\d+\.\d')
|
||||||
$languageAndRuntime.AddToolVersion("Bash", $(Get-BashVersion))
|
$languageAndRuntime.AddToolVersion("Bash", $(Get-BashVersion))
|
||||||
$languageAndRuntime.AddNodes($(Get-ClangLLVMVersions))
|
$languageAndRuntime.AddNodes($(Get-ClangLLVMVersions))
|
||||||
$languageAndRuntime.AddNodes($(Get-GccVersions))
|
$languageAndRuntime.AddNodes($(Get-GccVersions))
|
||||||
$languageAndRuntime.AddNodes($(Get-FortranVersions))
|
$languageAndRuntime.AddNodes($(Get-FortranVersions))
|
||||||
$languageAndRuntime.AddToolVersion("Julia", $(Get-JuliaVersion))
|
$languageAndRuntime.AddToolVersion("Julia", $(Get-JuliaVersion))
|
||||||
$languageAndRuntime.AddToolVersion("Kotlin", $(Get-KotlinVersion))
|
$languageAndRuntime.AddToolVersion("Kotlin", $(Get-KotlinVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$languageAndRuntime.AddToolVersion("Go", $(Get-GoVersion))
|
$languageAndRuntime.AddToolVersion("Go", $(Get-GoVersion))
|
||||||
}
|
}
|
||||||
$languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion))
|
$languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion))
|
||||||
$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion))
|
$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$languageAndRuntime.AddToolVersion("MSBuild", $(Get-MSBuildVersion))
|
$languageAndRuntime.AddToolVersion("MSBuild", $(Get-MSBuildVersion))
|
||||||
$languageAndRuntime.AddToolVersion("NVM", $(Get-NVMVersion))
|
$languageAndRuntime.AddToolVersion("NVM", $(Get-NVMVersion))
|
||||||
$languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+')
|
$languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+')
|
||||||
}
|
}
|
||||||
$languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion))
|
$languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion))
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
||||||
$languageAndRuntime.AddToolVersion("PHP", $(Get-PHPVersion))
|
$languageAndRuntime.AddToolVersion("PHP", $(Get-PHPVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion))
|
$languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
||||||
$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version))
|
$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version))
|
||||||
}
|
}
|
||||||
$languageAndRuntime.AddToolVersion("R", $(Get-RVersion))
|
$languageAndRuntime.AddToolVersion("R", $(Get-RVersion))
|
||||||
$languageAndRuntime.AddToolVersion("Ruby", $(Get-RubyVersion))
|
$languageAndRuntime.AddToolVersion("Ruby", $(Get-RubyVersion))
|
||||||
|
|
||||||
# Package Management
|
# Package Management
|
||||||
$packageManagement = $installedSoftware.AddHeader("Package Management")
|
$packageManagement = $installedSoftware.AddHeader("Package Management")
|
||||||
$packageManagement.AddToolVersion("Bundler", $(Get-BundlerVersion))
|
$packageManagement.AddToolVersion("Bundler", $(Get-BundlerVersion))
|
||||||
$packageManagement.AddToolVersion("Carthage", $(Get-CarthageVersion))
|
$packageManagement.AddToolVersion("Carthage", $(Get-CarthageVersion))
|
||||||
$packageManagement.AddToolVersion("CocoaPods", $(Get-CocoaPodsVersion))
|
$packageManagement.AddToolVersion("CocoaPods", $(Get-CocoaPodsVersion))
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
||||||
$packageManagement.AddToolVersion("Composer", $(Get-ComposerVersion))
|
$packageManagement.AddToolVersion("Composer", $(Get-ComposerVersion))
|
||||||
}
|
}
|
||||||
$packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion))
|
$packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$packageManagement.AddToolVersion("Miniconda", $(Get-CondaVersion))
|
$packageManagement.AddToolVersion("Miniconda", $(Get-CondaVersion))
|
||||||
}
|
}
|
||||||
$packageManagement.AddToolVersion("NPM", $(Get-NPMVersion))
|
$packageManagement.AddToolVersion("NPM", $(Get-NPMVersion))
|
||||||
$packageManagement.AddToolVersion("NuGet", $(Get-NuGetVersion))
|
$packageManagement.AddToolVersion("NuGet", $(Get-NuGetVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$packageManagement.AddToolVersion("Pip", $(Get-PipVersion -Version 2))
|
$packageManagement.AddToolVersion("Pip", $(Get-PipVersion -Version 2))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
||||||
$packageManagement.AddToolVersion("Pip3", $(Get-PipVersion -Version 3))
|
$packageManagement.AddToolVersion("Pip3", $(Get-PipVersion -Version 3))
|
||||||
$packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion))
|
$packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
$packageManagement.AddToolVersion("RubyGems", $(Get-RubyGemsVersion))
|
$packageManagement.AddToolVersion("RubyGems", $(Get-RubyGemsVersion))
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
||||||
$packageManagement.AddToolVersion("Vcpkg", $(Get-VcpkgVersion))
|
$packageManagement.AddToolVersion("Vcpkg", $(Get-VcpkgVersion))
|
||||||
}
|
}
|
||||||
$packageManagement.AddToolVersion("Yarn", $(Get-YarnVersion))
|
$packageManagement.AddToolVersion("Yarn", $(Get-YarnVersion))
|
||||||
|
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$packageManagement.AddNode($(Build-PackageManagementEnvironmentTable))
|
$packageManagement.AddNode($(Build-PackageManagementEnvironmentTable))
|
||||||
}
|
}
|
||||||
# Project Management
|
# Project Management
|
||||||
$projectManagement = $installedSoftware.AddHeader("Project Management")
|
$projectManagement = $installedSoftware.AddHeader("Project Management")
|
||||||
$projectManagement.AddToolVersion("Apache Ant", $(Get-ApacheAntVersion))
|
$projectManagement.AddToolVersion("Apache Ant", $(Get-ApacheAntVersion))
|
||||||
$projectManagement.AddToolVersion("Apache Maven", $(Get-MavenVersion))
|
$projectManagement.AddToolVersion("Apache Maven", $(Get-MavenVersion))
|
||||||
$projectManagement.AddToolVersion("Gradle", $(Get-GradleVersion))
|
$projectManagement.AddToolVersion("Gradle", $(Get-GradleVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$projectManagement.AddToolVersion("Sbt", $(Get-SbtVersion))
|
$projectManagement.AddToolVersion("Sbt", $(Get-SbtVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
$utilities = $installedSoftware.AddHeader("Utilities")
|
$utilities = $installedSoftware.AddHeader("Utilities")
|
||||||
$utilities.AddToolVersion("7-Zip", $(Get-7zipVersion))
|
$utilities.AddToolVersion("7-Zip", $(Get-7zipVersion))
|
||||||
$utilities.AddToolVersion("aria2", $(Get-Aria2Version))
|
$utilities.AddToolVersion("aria2", $(Get-Aria2Version))
|
||||||
$utilities.AddToolVersion("azcopy", $(Get-AzcopyVersion))
|
$utilities.AddToolVersion("azcopy", $(Get-AzcopyVersion))
|
||||||
$utilities.AddToolVersion("bazel", $(Get-BazelVersion))
|
$utilities.AddToolVersion("bazel", $(Get-BazelVersion))
|
||||||
$utilities.AddToolVersion("bazelisk", $(Get-BazeliskVersion))
|
$utilities.AddToolVersion("bazelisk", $(Get-BazeliskVersion))
|
||||||
$utilities.AddToolVersion("bsdtar", $(Get-BsdtarVersion))
|
$utilities.AddToolVersion("bsdtar", $(Get-BsdtarVersion))
|
||||||
$utilities.AddToolVersion("Curl", $(Get-CurlVersion))
|
$utilities.AddToolVersion("Curl", $(Get-CurlVersion))
|
||||||
$utilities.AddToolVersion("Git", $(Get-GitVersion))
|
$utilities.AddToolVersion("Git", $(Get-GitVersion))
|
||||||
$utilities.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
|
$utilities.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
|
||||||
$utilities.AddToolVersion("GitHub CLI", $(Get-GitHubCLIVersion))
|
$utilities.AddToolVersion("GitHub CLI", $(Get-GitHubCLIVersion))
|
||||||
$utilities.AddToolVersion("GNU Tar", $(Get-GnuTarVersion))
|
$utilities.AddToolVersion("GNU Tar", $(Get-GnuTarVersion))
|
||||||
$utilities.AddToolVersion("GNU Wget", $(Get-WgetVersion))
|
$utilities.AddToolVersion("GNU Wget", $(Get-WgetVersion))
|
||||||
$utilities.AddToolVersion("gpg (GnuPG)", $(Get-GPGVersion))
|
$utilities.AddToolVersion("gpg (GnuPG)", $(Get-GPGVersion))
|
||||||
if ($os.IsBigSur) {
|
if ($os.IsBigSur) {
|
||||||
$utilities.AddToolVersion("helm", $(Get-HelmVersion))
|
$utilities.AddToolVersion("helm", $(Get-HelmVersion))
|
||||||
}
|
}
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$utilities.AddToolVersion("ImageMagick", $(Get-ImageMagickVersion))
|
$utilities.AddToolVersion("ImageMagick", $(Get-ImageMagickVersion))
|
||||||
}
|
}
|
||||||
$utilities.AddToolVersion("jq", $(Get-JqVersion))
|
$utilities.AddToolVersion("jq", $(Get-JqVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$utilities.AddToolVersion("mongo", $(Get-MongoVersion))
|
$utilities.AddToolVersion("mongo", $(Get-MongoVersion))
|
||||||
$utilities.AddToolVersion("mongod", $(Get-MongodVersion))
|
$utilities.AddToolVersion("mongod", $(Get-MongodVersion))
|
||||||
}
|
}
|
||||||
if ($os.IsBigSur) {
|
if ($os.IsBigSur) {
|
||||||
$utilities.AddToolVersion("Newman", $(Get-NewmanVersion))
|
$utilities.AddToolVersion("Newman", $(Get-NewmanVersion))
|
||||||
}
|
}
|
||||||
$utilities.AddToolVersion("OpenSSL", $(Get-OpenSSLVersion))
|
$utilities.AddToolVersion("OpenSSL", $(Get-OpenSSLVersion))
|
||||||
$utilities.AddToolVersion("Packer", $(Get-PackerVersion))
|
$utilities.AddToolVersion("Packer", $(Get-PackerVersion))
|
||||||
$utilities.AddToolVersion("pkg-config", $(Get-PKGConfigVersion))
|
$utilities.AddToolVersion("pkg-config", $(Get-PKGConfigVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$utilities.AddToolVersion("PostgreSQL", $(Get-PostgresServerVersion))
|
$utilities.AddToolVersion("PostgreSQL", $(Get-PostgresServerVersion))
|
||||||
$utilities.AddToolVersion("psql (PostgreSQL)", $(Get-PostgresClientVersion))
|
$utilities.AddToolVersion("psql (PostgreSQL)", $(Get-PostgresClientVersion))
|
||||||
$utilities.AddToolVersion("Sox", $(Get-SoxVersion))
|
$utilities.AddToolVersion("Sox", $(Get-SoxVersion))
|
||||||
$utilities.AddToolVersion("Subversion (SVN)", $(Get-SVNVersion))
|
$utilities.AddToolVersion("Subversion (SVN)", $(Get-SVNVersion))
|
||||||
$utilities.AddToolVersion("Switchaudio-osx", $(Get-SwitchAudioOsxVersion))
|
$utilities.AddToolVersion("Switchaudio-osx", $(Get-SwitchAudioOsxVersion))
|
||||||
}
|
}
|
||||||
if ($os.IsMonterey) {
|
if ($os.IsMonterey) {
|
||||||
$utilities.AddToolVersion("Vagrant", $(Get-VagrantVersion))
|
$utilities.AddToolVersion("Vagrant", $(Get-VagrantVersion))
|
||||||
$utilities.AddToolVersion("VirtualBox", $(Get-VirtualBoxVersion))
|
$utilities.AddToolVersion("VirtualBox", $(Get-VirtualBoxVersion))
|
||||||
}
|
}
|
||||||
$utilities.AddToolVersion("yq", $(Get-YqVersion))
|
$utilities.AddToolVersion("yq", $(Get-YqVersion))
|
||||||
$utilities.AddToolVersion("zstd", $(Get-ZstdVersion))
|
$utilities.AddToolVersion("zstd", $(Get-ZstdVersion))
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
$tools = $installedSoftware.AddHeader("Tools")
|
$tools = $installedSoftware.AddHeader("Tools")
|
||||||
if ($os.IsBigSur) {
|
if ($os.IsBigSur) {
|
||||||
$tools.AddToolVersion("Aliyun CLI", $(Get-AliyunCLIVersion))
|
$tools.AddToolVersion("Aliyun CLI", $(Get-AliyunCLIVersion))
|
||||||
}
|
}
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$tools.AddToolVersion("App Center CLI", $(Get-AppCenterCLIVersion))
|
$tools.AddToolVersion("App Center CLI", $(Get-AppCenterCLIVersion))
|
||||||
}
|
}
|
||||||
$tools.AddToolVersion("AWS CLI", $(Get-AWSCLIVersion))
|
$tools.AddToolVersion("AWS CLI", $(Get-AWSCLIVersion))
|
||||||
$tools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMCLIVersion))
|
$tools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMCLIVersion))
|
||||||
$tools.AddToolVersion("AWS Session Manager CLI", $(Get-AWSSessionManagerCLIVersion))
|
$tools.AddToolVersion("AWS Session Manager CLI", $(Get-AWSSessionManagerCLIVersion))
|
||||||
$tools.AddToolVersion("Azure CLI", $(Get-AzureCLIVersion))
|
$tools.AddToolVersion("Azure CLI", $(Get-AzureCLIVersion))
|
||||||
$tools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
|
$tools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
|
||||||
$tools.AddToolVersion("Bicep CLI", $(Get-BicepVersion))
|
$tools.AddToolVersion("Bicep CLI", $(Get-BicepVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$tools.AddToolVersion("Cabal", $(Get-CabalVersion))
|
$tools.AddToolVersion("Cabal", $(Get-CabalVersion))
|
||||||
}
|
}
|
||||||
$tools.AddToolVersion("Cmake", $(Get-CmakeVersion))
|
$tools.AddToolVersion("Cmake", $(Get-CmakeVersion))
|
||||||
$tools.AddToolVersion("CodeQL Action Bundle", $(Get-CodeQLBundleVersion))
|
$tools.AddToolVersion("CodeQL Action Bundle", $(Get-CodeQLBundleVersion))
|
||||||
if ($os.IsMonterey) {
|
if ($os.IsMonterey) {
|
||||||
$tools.AddToolVersion("Colima", $(Get-ColimaVersion))
|
$tools.AddToolVersion("Colima", $(Get-ColimaVersion))
|
||||||
}
|
}
|
||||||
$tools.AddToolVersion("Fastlane", $(Get-FastlaneVersion))
|
$tools.AddToolVersion("Fastlane", $(Get-FastlaneVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$tools.AddToolVersion("GHC", $(Get-GHCVersion))
|
$tools.AddToolVersion("GHC", $(Get-GHCVersion))
|
||||||
$tools.AddToolVersion("GHCup", $(Get-GHCupVersion))
|
$tools.AddToolVersion("GHCup", $(Get-GHCupVersion))
|
||||||
$tools.AddToolVersion("Jazzy", $(Get-JazzyVersion))
|
$tools.AddToolVersion("Jazzy", $(Get-JazzyVersion))
|
||||||
}
|
}
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
||||||
$tools.AddToolVersion("Stack", $(Get-StackVersion))
|
$tools.AddToolVersion("Stack", $(Get-StackVersion))
|
||||||
}
|
}
|
||||||
$tools.AddToolVersion("SwiftFormat", $(Get-SwiftFormatVersion))
|
$tools.AddToolVersion("SwiftFormat", $(Get-SwiftFormatVersion))
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$tools.AddToolVersion("Swig", $(Get-SwigVersion))
|
$tools.AddToolVersion("Swig", $(Get-SwigVersion))
|
||||||
}
|
}
|
||||||
$tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVersion))
|
$tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVersion))
|
||||||
|
|
||||||
# Linters
|
# Linters
|
||||||
$linters = $installedSoftware.AddHeader("Linters")
|
$linters = $installedSoftware.AddHeader("Linters")
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
||||||
$linters.AddToolVersion("SwiftLint", $(Get-SwiftLintVersion))
|
$linters.AddToolVersion("SwiftLint", $(Get-SwiftLintVersion))
|
||||||
}
|
}
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$linters.AddToolVersion("Yamllint", $(Get-YamllintVersion))
|
$linters.AddToolVersion("Yamllint", $(Get-YamllintVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
# Browsers
|
# Browsers
|
||||||
$browsers = $installedSoftware.AddHeader("Browsers")
|
$browsers = $installedSoftware.AddHeader("Browsers")
|
||||||
$browsers.AddNodes($(Build-BrowserSection))
|
$browsers.AddNodes($(Build-BrowserSection))
|
||||||
$browsers.AddNode($(Build-BrowserWebdriversEnvironmentTable))
|
$browsers.AddNode($(Build-BrowserWebdriversEnvironmentTable))
|
||||||
|
|
||||||
# Java
|
# Java
|
||||||
$java = $installedSoftware.AddHeader("Java")
|
$java = $installedSoftware.AddHeader("Java")
|
||||||
$java.AddTable($(Get-JavaVersions))
|
$java.AddTable($(Get-JavaVersions))
|
||||||
|
|
||||||
# Toolcache
|
# Toolcache
|
||||||
if (-not $os.IsSonoma) {
|
if (-not $os.IsSonoma) {
|
||||||
$toolcache = $installedSoftware.AddHeader("Cached Tools")
|
$toolcache = $installedSoftware.AddHeader("Cached Tools")
|
||||||
$toolcache.AddNodes($(Build-ToolcacheSection))
|
$toolcache.AddNodes($(Build-ToolcacheSection))
|
||||||
|
|
||||||
# Rust
|
# Rust
|
||||||
$rust = $installedSoftware.AddHeader("Rust Tools")
|
$rust = $installedSoftware.AddHeader("Rust Tools")
|
||||||
$rust.AddToolVersion("Cargo", $(Get-RustCargoVersion))
|
$rust.AddToolVersion("Cargo", $(Get-RustCargoVersion))
|
||||||
$rust.AddToolVersion("Rust", $(Get-RustVersion))
|
$rust.AddToolVersion("Rust", $(Get-RustVersion))
|
||||||
$rust.AddToolVersion("Rustdoc", $(Get-RustdocVersion))
|
$rust.AddToolVersion("Rustdoc", $(Get-RustdocVersion))
|
||||||
$rust.AddToolVersion("Rustup", $(Get-RustupVersion))
|
$rust.AddToolVersion("Rustup", $(Get-RustupVersion))
|
||||||
|
|
||||||
$rustPackages = $rust.AddHeader("Packages")
|
$rustPackages = $rust.AddHeader("Packages")
|
||||||
if (-not $os.IsVentura) {
|
if (-not $os.IsVentura) {
|
||||||
$rustPackages.AddToolVersion("Bindgen", $(Get-Bindgen))
|
$rustPackages.AddToolVersion("Bindgen", $(Get-Bindgen))
|
||||||
$rustPackages.AddToolVersion("Cargo-audit", $(Get-Cargoaudit))
|
$rustPackages.AddToolVersion("Cargo-audit", $(Get-Cargoaudit))
|
||||||
$rustPackages.AddToolVersion("Cargo-outdated", $(Get-Cargooutdated))
|
$rustPackages.AddToolVersion("Cargo-outdated", $(Get-Cargooutdated))
|
||||||
$rustPackages.AddToolVersion("Cbindgen", $(Get-Cbindgen))
|
$rustPackages.AddToolVersion("Cbindgen", $(Get-Cbindgen))
|
||||||
}
|
}
|
||||||
$rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion))
|
$rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion))
|
||||||
$rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion))
|
$rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
# PowerShell
|
# PowerShell
|
||||||
$powerShell = $installedSoftware.AddHeader("PowerShell Tools")
|
$powerShell = $installedSoftware.AddHeader("PowerShell Tools")
|
||||||
$powerShell.AddToolVersion("PowerShell", $(Get-PowershellVersion))
|
$powerShell.AddToolVersion("PowerShell", $(Get-PowershellVersion))
|
||||||
|
|
||||||
$powerShellModules = $powerShell.AddHeader("PowerShell Modules")
|
$powerShellModules = $powerShell.AddHeader("PowerShell Modules")
|
||||||
$powerShellModules.AddNodes($(Get-PowerShellModules))
|
$powerShellModules.AddNodes($(Get-PowerShellModules))
|
||||||
|
|
||||||
# Web Servers
|
# Web Servers
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$webServers = $installedSoftware.AddHeader("Web Servers")
|
$webServers = $installedSoftware.AddHeader("Web Servers")
|
||||||
$webServers.AddTable($(Build-WebServersSection))
|
$webServers.AddTable($(Build-WebServersSection))
|
||||||
}
|
}
|
||||||
|
|
||||||
# Xamarin section
|
# Xamarin section
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
||||||
$xamarin = $installedSoftware.AddHeader("Xamarin")
|
$xamarin = $installedSoftware.AddHeader("Xamarin")
|
||||||
$vsForMac = $xamarin.AddHeader("Visual Studio for Mac")
|
$vsForMac = $xamarin.AddHeader("Visual Studio for Mac")
|
||||||
$vsForMac.AddTable($(Build-VSMacTable))
|
$vsForMac.AddTable($(Build-VSMacTable))
|
||||||
$note =
|
$note =
|
||||||
@'
|
@'
|
||||||
To use Visual Studio 2019 by default rename the app:
|
To use Visual Studio 2019 by default rename the app:
|
||||||
mv "/Applications/Visual Studio.app" "/Applications/Visual Studio 2022.app"
|
mv "/Applications/Visual Studio.app" "/Applications/Visual Studio 2022.app"
|
||||||
mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
|
mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
|
||||||
'@
|
'@
|
||||||
$vsForMacNotes = $vsForMac.AddHeader("Notes")
|
$vsForMacNotes = $vsForMac.AddHeader("Notes")
|
||||||
$vsForMacNotes.AddNote($note)
|
$vsForMacNotes.AddNote($note)
|
||||||
|
|
||||||
$xamarinBundles = $xamarin.AddHeader("Xamarin bundles")
|
$xamarinBundles = $xamarin.AddHeader("Xamarin bundles")
|
||||||
$xamarinBundles.AddTable($(Build-XamarinTable))
|
$xamarinBundles.AddTable($(Build-XamarinTable))
|
||||||
|
|
||||||
$unitTestFramework = $xamarin.AddHeader("Unit Test Framework")
|
$unitTestFramework = $xamarin.AddHeader("Unit Test Framework")
|
||||||
$unitTestFramework.AddToolVersion("NUnit", $(Get-NUnitVersion))
|
$unitTestFramework.AddToolVersion("NUnit", $(Get-NUnitVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
# Xcode section
|
# Xcode section
|
||||||
$xcode = $installedSoftware.AddHeader("Xcode")
|
$xcode = $installedSoftware.AddHeader("Xcode")
|
||||||
# First run doesn't provide full data about devices and runtimes
|
# First run doesn't provide full data about devices and runtimes
|
||||||
Get-XcodeInfoList | Out-Null
|
Get-XcodeInfoList | Out-Null
|
||||||
|
|
||||||
$xcodeInfo = Get-XcodeInfoList
|
$xcodeInfo = Get-XcodeInfoList
|
||||||
$xcode.AddTable($(Build-XcodeTable $xcodeInfo))
|
$xcode.AddTable($(Build-XcodeTable $xcodeInfo))
|
||||||
|
|
||||||
$xcodeTools = $xcode.AddHeader("Xcode Support Tools")
|
$xcodeTools = $xcode.AddHeader("Xcode Support Tools")
|
||||||
$xcodeTools.AddNodes($(Build-XcodeSupportToolsSection))
|
$xcodeTools.AddNodes($(Build-XcodeSupportToolsSection))
|
||||||
|
|
||||||
$installedSdks = $xcode.AddHeader("Installed SDKs")
|
$installedSdks = $xcode.AddHeader("Installed SDKs")
|
||||||
$installedSdks.AddTable($(Build-XcodeSDKTable $xcodeInfo))
|
$installedSdks.AddTable($(Build-XcodeSDKTable $xcodeInfo))
|
||||||
|
|
||||||
$installedSimulators = $xcode.AddHeader("Installed Simulators")
|
$installedSimulators = $xcode.AddHeader("Installed Simulators")
|
||||||
$installedSimulators.AddTable($(Build-XcodeSimulatorsTable $xcodeInfo))
|
$installedSimulators.AddTable($(Build-XcodeSimulatorsTable $xcodeInfo))
|
||||||
|
|
||||||
# Android section
|
# Android section
|
||||||
$android = $installedSoftware.AddHeader("Android")
|
$android = $installedSoftware.AddHeader("Android")
|
||||||
$androidTable = Build-AndroidTable
|
$androidTable = Build-AndroidTable
|
||||||
$android.AddTable($androidTable)
|
$android.AddTable($androidTable)
|
||||||
|
|
||||||
$androidEnv = $android.AddHeader("Environment variables")
|
$androidEnv = $android.AddHeader("Environment variables")
|
||||||
$androidEnv.AddTable($(Build-AndroidEnvironmentTable))
|
$androidEnv.AddTable($(Build-AndroidEnvironmentTable))
|
||||||
|
|
||||||
if ($os.IsBigSur -or $os.IsMonterey) {
|
if ($os.IsBigSur -or $os.IsMonterey) {
|
||||||
$miscellaneous = $installedSoftware.AddHeader("Miscellaneous")
|
$miscellaneous = $installedSoftware.AddHeader("Miscellaneous")
|
||||||
$miscellaneous.AddToolVersion("libXext", $(Get-LibXextVersion))
|
$miscellaneous.AddToolVersion("libXext", $(Get-LibXextVersion))
|
||||||
$miscellaneous.AddToolVersion("libXft", $(Get-LibXftVersion))
|
$miscellaneous.AddToolVersion("libXft", $(Get-LibXftVersion))
|
||||||
$miscellaneous.AddToolVersion("Tcl/Tk", $(Get-TclTkVersion))
|
$miscellaneous.AddToolVersion("Tcl/Tk", $(Get-TclTkVersion))
|
||||||
$miscellaneous.AddToolVersion("Zlib", $(Get-ZlibVersion))
|
$miscellaneous.AddToolVersion("Zlib", $(Get-ZlibVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($os.IsMonterey) {
|
if ($os.IsMonterey) {
|
||||||
$miscellaneousEnv = $miscellaneous.AddHeader("Environment variables")
|
$miscellaneousEnv = $miscellaneous.AddHeader("Environment variables")
|
||||||
$miscellaneousEnv.AddTable($(Build-MiscellaneousEnvironmentTable))
|
$miscellaneousEnv.AddTable($(Build-MiscellaneousEnvironmentTable))
|
||||||
|
|
||||||
$notes = @'
|
$notes = @'
|
||||||
If you want to use Parallels Desktop you should download a package from URL stored in
|
If you want to use Parallels Desktop you should download a package from URL stored in
|
||||||
PARALLELS_DMG_URL environment variable. A system extension is allowed for this version.
|
PARALLELS_DMG_URL environment variable. A system extension is allowed for this version.
|
||||||
'@
|
'@
|
||||||
$miscellaneousEnvNotes = $miscellaneousEnv.AddHeader("Notes")
|
$miscellaneousEnvNotes = $miscellaneousEnv.AddHeader("Notes")
|
||||||
$miscellaneousEnvNotes.AddNote($notes)
|
$miscellaneousEnvNotes.AddNote($notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not (Test-Path $OutputDirectory)) { New-Item -Path $OutputDirectory -ItemType Directory | Out-Null }
|
if (-not (Test-Path $OutputDirectory)) { New-Item -Path $OutputDirectory -ItemType Directory | Out-Null }
|
||||||
|
|
||||||
#
|
#
|
||||||
# Write final reports
|
# Write final reports
|
||||||
#
|
#
|
||||||
Write-Host $markdownExtended
|
Write-Host $markdownExtended
|
||||||
$softwareReport.ToJson() | Out-File -FilePath "${OutputDirectory}/systeminfo.json" -Encoding UTF8NoBOM
|
$softwareReport.ToJson() | Out-File -FilePath "${OutputDirectory}/systeminfo.json" -Encoding UTF8NoBOM
|
||||||
$softwareReport.ToMarkdown() | Out-File -FilePath "${OutputDirectory}/systeminfo.md" -Encoding UTF8NoBOM
|
$softwareReport.ToMarkdown() | Out-File -FilePath "${OutputDirectory}/systeminfo.md" -Encoding UTF8NoBOM
|
||||||
0
images/macos/provision/utils/utils.sh → images/macos/scripts/helpers/utils.sh
Executable file → Normal file
0
images/macos/provision/utils/utils.sh → images/macos/scripts/helpers/utils.sh
Executable file → Normal file
@@ -1,82 +1,82 @@
|
|||||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||||
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking
|
||||||
Import-Module "$PSScriptRoot/../software-report/SoftwareReport.Android.psm1" -DisableNameChecking
|
Import-Module "$PSScriptRoot/../software-report/SoftwareReport.Android.psm1" -DisableNameChecking
|
||||||
|
|
||||||
$os = Get-OSVersion
|
$os = Get-OSVersion
|
||||||
|
|
||||||
Describe "Android" {
|
Describe "Android" {
|
||||||
$androidSdkManagerPackages = Get-AndroidPackages
|
$androidSdkManagerPackages = Get-AndroidPackages
|
||||||
[int]$platformMinVersion = Get-ToolsetValue "android.platform_min_version"
|
[int]$platformMinVersion = Get-ToolsetValue "android.platform_min_version"
|
||||||
[version]$buildToolsMinVersion = Get-ToolsetValue "android.build_tools_min_version"
|
[version]$buildToolsMinVersion = Get-ToolsetValue "android.build_tools_min_version"
|
||||||
[array]$ndkVersions = Get-ToolsetValue "android.ndk.versions"
|
[array]$ndkVersions = Get-ToolsetValue "android.ndk.versions"
|
||||||
$ndkFullVersions = $ndkVersions | ForEach-Object { Get-ChildItem "$env:ANDROID_HOME/ndk/${_}.*" -Name | Select-Object -Last 1 } | ForEach-Object { "ndk/${_}" }
|
$ndkFullVersions = $ndkVersions | ForEach-Object { Get-ChildItem "$env:ANDROID_HOME/ndk/${_}.*" -Name | Select-Object -Last 1 } | ForEach-Object { "ndk/${_}" }
|
||||||
# Platforms starting with a letter are the preview versions, which is not installed on the image
|
# Platforms starting with a letter are the preview versions, which is not installed on the image
|
||||||
$platformVersionsList = ($androidSdkManagerPackages | Where-Object { "$_".StartsWith("platforms;") }) -replace 'platforms;android-', '' | Where-Object { $_ -match "^\d" } | Sort-Object -Unique
|
$platformVersionsList = ($androidSdkManagerPackages | Where-Object { "$_".StartsWith("platforms;") }) -replace 'platforms;android-', '' | Where-Object { $_ -match "^\d" } | Sort-Object -Unique
|
||||||
$platformsInstalled = $platformVersionsList | Where-Object { [int]($_.Split("-")[0]) -ge $platformMinVersion } | ForEach-Object { "platforms/android-${_}" }
|
$platformsInstalled = $platformVersionsList | Where-Object { [int]($_.Split("-")[0]) -ge $platformMinVersion } | ForEach-Object { "platforms/android-${_}" }
|
||||||
|
|
||||||
$buildToolsList = ($androidSdkManagerPackages | Where-Object { "$_".StartsWith("build-tools;") }) -replace 'build-tools;', ''
|
$buildToolsList = ($androidSdkManagerPackages | Where-Object { "$_".StartsWith("build-tools;") }) -replace 'build-tools;', ''
|
||||||
$buildTools = $buildToolsList | Where-Object { $_ -match "\d+(\.\d+){2,}$" } | Where-Object { [version]$_ -ge $buildToolsMinVersion } | Sort-Object -Unique |
|
$buildTools = $buildToolsList | Where-Object { $_ -match "\d+(\.\d+){2,}$" } | Where-Object { [version]$_ -ge $buildToolsMinVersion } | Sort-Object -Unique |
|
||||||
ForEach-Object { "build-tools/${_}" }
|
ForEach-Object { "build-tools/${_}" }
|
||||||
|
|
||||||
$androidPackages = @(
|
$androidPackages = @(
|
||||||
"tools",
|
"tools",
|
||||||
"platform-tools",
|
"platform-tools",
|
||||||
"cmake",
|
"cmake",
|
||||||
$platformsInstalled,
|
$platformsInstalled,
|
||||||
$buildTools,
|
$buildTools,
|
||||||
$ndkFullVersions,
|
$ndkFullVersions,
|
||||||
(Get-ToolsetValue "android.extra-list" | ForEach-Object { "extras/${_}" }),
|
(Get-ToolsetValue "android.extra-list" | ForEach-Object { "extras/${_}" }),
|
||||||
(Get-ToolsetValue "android.addon-list" | ForEach-Object { "add-ons/${_}" }),
|
(Get-ToolsetValue "android.addon-list" | ForEach-Object { "add-ons/${_}" }),
|
||||||
(Get-ToolsetValue "android.additional-tools")
|
(Get-ToolsetValue "android.additional-tools")
|
||||||
) | ForEach-Object { $_ }
|
) | ForEach-Object { $_ }
|
||||||
|
|
||||||
# Remove empty strings from array to avoid possible issues
|
# Remove empty strings from array to avoid possible issues
|
||||||
$androidPackages = $androidPackages | Where-Object { $_ }
|
$androidPackages = $androidPackages | Where-Object { $_ }
|
||||||
|
|
||||||
BeforeAll {
|
BeforeAll {
|
||||||
$ANDROID_SDK_DIR = Join-Path $env:HOME "Library" "Android" "sdk"
|
$ANDROID_SDK_DIR = Join-Path $env:HOME "Library" "Android" "sdk"
|
||||||
|
|
||||||
function Validate-AndroidPackage {
|
function Validate-AndroidPackage {
|
||||||
param (
|
param (
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[string]$PackageName
|
[string]$PackageName
|
||||||
)
|
)
|
||||||
|
|
||||||
# Convert 'm2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta1' ->
|
# Convert 'm2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta1' ->
|
||||||
# 'm2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta1'
|
# 'm2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta1'
|
||||||
$PackageName = $PackageName.Replace(";", "/")
|
$PackageName = $PackageName.Replace(";", "/")
|
||||||
$targetPath = Join-Path $ANDROID_SDK_DIR $PackageName
|
$targetPath = Join-Path $ANDROID_SDK_DIR $PackageName
|
||||||
$targetPath | Should -Exist
|
$targetPath | Should -Exist
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Context "SDKManagers" {
|
Context "SDKManagers" {
|
||||||
$testCases = @(
|
$testCases = @(
|
||||||
@{
|
@{
|
||||||
PackageName = "Command-line tools"
|
PackageName = "Command-line tools"
|
||||||
Sdkmanager = "$env:ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
|
Sdkmanager = "$env:ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if ($os.IsBigSur -or $os.IsMonterey) {
|
if ($os.IsBigSur -or $os.IsMonterey) {
|
||||||
$testCases += @(
|
$testCases += @(
|
||||||
@{
|
@{
|
||||||
PackageName = "SDK tools"
|
PackageName = "SDK tools"
|
||||||
Sdkmanager = "$env:ANDROID_HOME/tools/bin/sdkmanager"
|
Sdkmanager = "$env:ANDROID_HOME/tools/bin/sdkmanager"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Sdkmanager from <PackageName> is available" -TestCases $testCases {
|
It "Sdkmanager from <PackageName> is available" -TestCases $testCases {
|
||||||
"$Sdkmanager --version" | Should -ReturnZeroExitCode
|
"$Sdkmanager --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Context "Packages" {
|
Context "Packages" {
|
||||||
$testCases = $androidPackages | ForEach-Object { @{ PackageName = $_ } }
|
$testCases = $androidPackages | ForEach-Object { @{ PackageName = $_ } }
|
||||||
|
|
||||||
It "<PackageName>" -TestCases $testCases {
|
It "<PackageName>" -TestCases $testCases {
|
||||||
param ([string] $PackageName)
|
param ([string] $PackageName)
|
||||||
Validate-AndroidPackage $PackageName
|
Validate-AndroidPackage $PackageName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user