From 01f78be8a686aaf780c2edda717b43a055c6c8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulises=20Gasc=C3=B3n?= Date: Fri, 13 Sep 2024 10:38:41 +0200 Subject: [PATCH] ci: ensure Homebrew environment is set up in the shell profile --- orka/templates/macos-13-arm-release.pkr.hcl | 8 ++++++++ orka/templates/macos-13-arm-test.pkr.hcl | 8 ++++++++ orka/templates/macos-13-intel-release.pkr.hcl | 8 ++++++++ orka/templates/macos-13-intel-test.pkr.hcl | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/orka/templates/macos-13-arm-release.pkr.hcl b/orka/templates/macos-13-arm-release.pkr.hcl index c94d8530d..fce129ebc 100644 --- a/orka/templates/macos-13-arm-release.pkr.hcl +++ b/orka/templates/macos-13-arm-release.pkr.hcl @@ -95,6 +95,14 @@ build { "eval \"$($(brew --prefix)/bin/brew shellenv)\"" ] } + // Ensure Homebrew environment is set up in the shell profile. + provisioner "shell" { + inline = [ + "echo 'Setting up Homebrew environment in shell profile...'", + "echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"' >> /Users/admin/.zshrc", + "echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"' >> /Users/admin/.bash_profile" + ] + } // Check Homebrew. Ignore errors because we are not using the last version of Xcode. provisioner "shell" { inline = [ diff --git a/orka/templates/macos-13-arm-test.pkr.hcl b/orka/templates/macos-13-arm-test.pkr.hcl index df4371b80..83d23aaa0 100644 --- a/orka/templates/macos-13-arm-test.pkr.hcl +++ b/orka/templates/macos-13-arm-test.pkr.hcl @@ -101,6 +101,14 @@ build { "eval \"$($(brew --prefix)/bin/brew shellenv)\"" ] } + // Ensure Homebrew environment is set up in the shell profile. + provisioner "shell" { + inline = [ + "echo 'Setting up Homebrew environment in shell profile...'", + "echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"' >> /Users/admin/.zshrc", + "echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"' >> /Users/admin/.bash_profile" + ] + } // Check Homebrew. Ignore errors because we are not using the last version of Xcode. provisioner "shell" { inline = [ diff --git a/orka/templates/macos-13-intel-release.pkr.hcl b/orka/templates/macos-13-intel-release.pkr.hcl index ba79bba4c..d619c79c0 100644 --- a/orka/templates/macos-13-intel-release.pkr.hcl +++ b/orka/templates/macos-13-intel-release.pkr.hcl @@ -93,6 +93,14 @@ build { "eval \"$($(brew --prefix)/bin/brew shellenv)\"" ] } + // Ensure Homebrew environment is set up in the shell profile. + provisioner "shell" { + inline = [ + "echo 'Setting up Homebrew environment in shell profile...'", + "echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/admin/.zshrc", + "echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/admin/.bash_profile" + ] + } // Check Homebrew. Ignore errors because we are not using the last version of Xcode. provisioner "shell" { inline = [ diff --git a/orka/templates/macos-13-intel-test.pkr.hcl b/orka/templates/macos-13-intel-test.pkr.hcl index fdc96bc03..b4bb92c24 100644 --- a/orka/templates/macos-13-intel-test.pkr.hcl +++ b/orka/templates/macos-13-intel-test.pkr.hcl @@ -100,6 +100,14 @@ build { "eval \"$($(brew --prefix)/bin/brew shellenv)\"" ] } + // Ensure Homebrew environment is set up in the shell profile. + provisioner "shell" { + inline = [ + "echo 'Setting up Homebrew environment in shell profile...'", + "echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/admin/.zshrc", + "echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/admin/.bash_profile" + ] + } // Check Homebrew. Ignore errors because we are not using the last version of Xcode. provisioner "shell" { inline = [