diff --git a/templates/xcode.pkr.hcl b/templates/xcode.pkr.hcl index 866381d..74000e1 100644 --- a/templates/xcode.pkr.hcl +++ b/templates/xcode.pkr.hcl @@ -167,6 +167,18 @@ build { } } + dynamic "provisioner" { + for_each = length(var.xcode_version) > 2 ? [2] : [] + labels = ["shell"] + content { + inline = [ + "source ~/.zprofile", + "sudo xcodes select '${var.xcode_version[2]}'", + "xcodebuild -downloadAllPlatforms", + ] + } + } + dynamic "provisioner" { for_each = length(var.xcode_version) > 1 ? [1] : [] labels = ["shell"]