Skip to content

Commit

Permalink
feat: add homebrew and common dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon committed Aug 27, 2024
1 parent f144942 commit 2a8dca3
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions orka/templates/macos-11-intel-test.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,27 @@ build {
]
provisioner "shell" {
inline = [
"echo we are running on the remote host",
"hostname",
"touch .we-ran-packer-successfully"
"echo 'Installing Homebrew...'",
"/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"",
"echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/${var.ssh_default_username}/.zprofile",
"eval \"$(/usr/local/bin/brew shellenv)\"",
"source /Users/${var.ssh_default_username}/.zprofile"
]
}
// Check Homebrew. Ignore errors as macos 11 is deprecated
provisioner "shell" {
inline = [
"echo 'Checking Homebrew...'",
"source /Users/${var.ssh_default_username}/.zprofile",
"brew doctor || true"
]
}
// Install dependencies using Homebrew. This can take hours to complete as all has to be compiled from source
provisioner "shell" {
inline = [
"echo 'Installing packages using Homebrew...'",
"source /Users/${var.ssh_default_username}/.zprofile",
"brew install git automake bash libtool cmake python ccache"
]
}
}

0 comments on commit 2a8dca3

Please sign in to comment.