diff --git a/images/macos/helpers/Common.Helpers.psm1 b/images/macos/helpers/Common.Helpers.psm1 index 0dbe2383..3fa9d56f 100644 --- a/images/macos/helpers/Common.Helpers.psm1 +++ b/images/macos/helpers/Common.Helpers.psm1 @@ -34,6 +34,7 @@ function Get-OSVersion { IsCatalina = $osVersionMajorMinor -eq "10.15" IsBigSur = $osVersion.Version.Major -eq "11" IsMonterey = $osVersion.Version.Major -eq "12" + IsVentura = $osVersion.Version.Major -eq "13" IsLessThanMonterey = $osVersion.Version.Major -lt "12" IsHigherThanCatalina = $osVersion.Version.Major -ge "11" } diff --git a/images/macos/provision/utils/utils.sh b/images/macos/provision/utils/utils.sh index 737102e0..b499b22f 100755 --- a/images/macos/provision/utils/utils.sh +++ b/images/macos/provision/utils/utils.sh @@ -39,6 +39,14 @@ download_with_retries() { return 1 } +is_Ventura() { + if [ "$OSTYPE" = "darwin22" ]; then + true + else + false + fi +} + is_Monterey() { if [ "$OSTYPE" = "darwin21" ]; then true @@ -114,6 +122,8 @@ get_brew_os_keyword() { echo "big_sur" elif is_Monterey; then echo "monterey" + elif is_Ventura; then + echo "ventura" else echo "null" fi @@ -147,7 +157,7 @@ should_build_from_source() { # Use the '--build-from-source' option to build from source in this case brew_smart_install() { local tool_name=$1 - + local os_name=$(get_brew_os_keyword) if [[ "$os_name" == "null" ]]; then echo "$OSTYPE is unknown operating system"