Configure xcode command line tools if missing in mac builder

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-06-19 18:01:36 +08:00 committed by Claudio Cambra
parent eb7929ace6
commit dd496bfcc7

View File

@ -47,6 +47,16 @@ func commandExists(_ command: String) -> Bool {
print("Configuring build tooling.")
if commandExists("git") {
print("Git is installed.")
} else {
print("Git is missing. Installing xcode command line tools.")
guard shell("xcode-select --install") == 0 else {
print("Failed to install xcode command line tools.")
exit(1)
}
}
if commandExists("brew") {
print("Brew is installed.")
} else {