[macOS] prepare helpers for macOS 13 (#7071)

This commit is contained in:
Alexey-Ayupov
2023-02-08 20:30:16 +03:00
committed by GitHub
parent 8282937409
commit 6341547de6
2 changed files with 12 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ function Get-OSVersion {
IsCatalina = $osVersionMajorMinor -eq "10.15" IsCatalina = $osVersionMajorMinor -eq "10.15"
IsBigSur = $osVersion.Version.Major -eq "11" IsBigSur = $osVersion.Version.Major -eq "11"
IsMonterey = $osVersion.Version.Major -eq "12" IsMonterey = $osVersion.Version.Major -eq "12"
IsVentura = $osVersion.Version.Major -eq "13"
IsLessThanMonterey = $osVersion.Version.Major -lt "12" IsLessThanMonterey = $osVersion.Version.Major -lt "12"
IsHigherThanCatalina = $osVersion.Version.Major -ge "11" IsHigherThanCatalina = $osVersion.Version.Major -ge "11"
} }

View File

@@ -39,6 +39,14 @@ download_with_retries() {
return 1 return 1
} }
is_Ventura() {
if [ "$OSTYPE" = "darwin22" ]; then
true
else
false
fi
}
is_Monterey() { is_Monterey() {
if [ "$OSTYPE" = "darwin21" ]; then if [ "$OSTYPE" = "darwin21" ]; then
true true
@@ -114,6 +122,8 @@ get_brew_os_keyword() {
echo "big_sur" echo "big_sur"
elif is_Monterey; then elif is_Monterey; then
echo "monterey" echo "monterey"
elif is_Ventura; then
echo "ventura"
else else
echo "null" echo "null"
fi fi