2021-04-08 12:55:47 +03:00
|
|
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
2020-09-10 14:34:08 +03:00
|
|
|
|
2022-05-26 17:05:57 +02:00
|
|
|
function Build-VSMacTable {
|
2023-12-04 12:13:08 +01:00
|
|
|
$vsMacVersions = (Get-ToolsetContent).xamarin.vsmac.versions
|
|
|
|
|
$defaultVSMacVersion = (Get-ToolsetContent).xamarin.vsmac.default
|
2022-05-26 17:05:57 +02:00
|
|
|
|
2022-12-06 18:16:20 +01:00
|
|
|
return $vsMacVersions | ForEach-Object {
|
2022-05-26 17:05:57 +02:00
|
|
|
$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)" : ""
|
2020-09-10 14:34:08 +03:00
|
|
|
|
2022-05-26 17:05:57 +02:00
|
|
|
[PSCustomObject] @{
|
|
|
|
|
"Version" = $_ + $defaultPostfix
|
|
|
|
|
"Build" = $build
|
|
|
|
|
"Path" = $vsPath
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-05-18 16:49:37 +02:00
|
|
|
}
|
|
|
|
|
|
2020-09-10 14:34:08 +03:00
|
|
|
function Get-NUnitVersion {
|
|
|
|
|
$version = Run-Command "nunit3-console --version" | Select-Object -First 1 | Take-Part -Part 3
|
2022-12-06 18:16:20 +01:00
|
|
|
return $version
|
2020-09-10 14:34:08 +03:00
|
|
|
}
|
|
|
|
|
|
2021-04-08 12:55:47 +03:00
|
|
|
function Build-XamarinTable {
|
2023-12-04 12:13:08 +01:00
|
|
|
$xamarinBundles = (Get-ToolsetContent).xamarin.bundles
|
|
|
|
|
$defaultSymlink = (Get-ToolsetContent).xamarin.bundle_default
|
2021-04-08 12:55:47 +03:00
|
|
|
if ($defaultSymlink -eq "latest") {
|
|
|
|
|
$defaultSymlink = $xamarinBundles[0].symlink
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $xamarinBundles | ForEach-Object {
|
|
|
|
|
$defaultPostfix = ($_.symlink -eq $defaultSymlink ) ? " (default)" : ""
|
|
|
|
|
[PSCustomObject] @{
|
2023-12-04 12:13:08 +01:00
|
|
|
"symlink" = $_.symlink + $defaultPostfix
|
2021-04-08 12:55:47 +03:00
|
|
|
"Xamarin.Mono" = $_.mono
|
|
|
|
|
"Xamarin.iOS" = $_.ios
|
|
|
|
|
"Xamarin.Mac" = $_.mac
|
|
|
|
|
"Xamarin.Android" = $_.android
|
2020-09-10 14:34:08 +03:00
|
|
|
}
|
2021-04-08 12:55:47 +03:00
|
|
|
}
|
2020-09-10 14:34:08 +03:00
|
|
|
}
|