Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,12 @@ jobs:
# allowed in official Homebrew taps. Remove it so the formula can be installed from
# this local dev tap. It must remain in the released formula, so we only strip it here.
sed -i '' '/no_autobump!/d' $(brew --repository)/Library/Taps/dev/homebrew-azure-cli/Formula/azure-cli.rb
# TODO(packaging): remove once the macOS CI agent image's Homebrew provides formula_opt_prefix.
# The upstream homebrew-core formula calls `formula_opt_prefix("openssl@3")`, a newer
# Homebrew DSL helper not available on the older Homebrew on the macOS CI agent image
# (NoMethodError). Rewrite it to the backward-compatible `Formula["openssl@3"].opt_prefix`
# form for the local test install only; the generated/submitted formula stays upstream-faithful.
sed -E -i '' 's/formula_opt_prefix\(?[[:space:]]*"([^"]+)"[[:space:]]*\)?/Formula["\1"].opt_prefix/g' $(brew --repository)/Library/Taps/dev/homebrew-azure-cli/Formula/azure-cli.rb
brew install --build-from-source dev/homebrew-azure-cli/azure-cli

echo == Az Version ==
Expand Down
6 changes: 6 additions & 0 deletions scripts/release/homebrew/test_homebrew_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ echo == Remove pre-installed azure-cli ==
brew uninstall azure-cli

echo == Install azure-cli.rb formula ==
# TODO(packaging): remove once the macOS CI agent image's Homebrew provides formula_opt_prefix.
# The upstream homebrew-core formula calls `formula_opt_prefix("openssl@3")`, a newer
# Homebrew DSL helper not available on the older Homebrew on the macOS CI agent image
# (NoMethodError). Rewrite it to the backward-compatible `Formula["openssl@3"].opt_prefix`
# form for the local test install only; the generated/submitted formula stays upstream-faithful.
sed -E -i '' 's/formula_opt_prefix\(?[[:space:]]*"([^"]+)"[[:space:]]*\)?/Formula["\1"].opt_prefix/g' $SYSTEM_ARTIFACTSDIRECTORY/homebrew/azure-cli.rb
brew install --build-from-source $SYSTEM_ARTIFACTSDIRECTORY/homebrew/azure-cli.rb

AZ_BASE=/usr/local/Cellar/azure-cli/$CLI_VERSION/libexec
Expand Down
Loading