Skip to content
Merged
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
7 changes: 6 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,12 @@ jobs:
brew uninstall azure-cli

echo == Install azure-cli.rb formula ==
brew install --build-from-source $SYSTEM_ARTIFACTSDIRECTORY/homebrew/azure-cli.rb
# Need to create a dummy homebrew tap to install the formula
Copy link
Contributor Author

@bebound bebound Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is found in Homebrew/brew#18371 (comment)

It also mentions that:

Yea, installing formulae from paths is buggy and shouldn't be used. We should probably remove the ability to do that at some point.

So creating a tap is the recommended way to install formula.

PS: Setting HOMEBREW_DEVELOPER=1 is a another workaround but the owner says it changes a lot of the behaviour of Homebrew: Homebrew/brew#20414 (comment).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homebrew keeps changing. We may want to release a ZIP or tar.gz package as soon as possible.

git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Copy link
Contributor Author

@bebound bebound Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tap-new requires Git user information; otherwise, the following error occurs:

linuxbrew@5ef95ab56d08:~$ brew tap-new dev/azure-cli
Warning: tap-new is a developer command, so Homebrew's
developer mode has been automatically turned on.
To turn developer mode off, run:
  brew developer off

Initialized empty Git repository in /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/dev/homebrew-azure-cli/.git/
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'linuxbrew@5ef95ab56d08.(none)')

PS: Although brew tap-new enables developer mode, it's not equal to HOMEBREW_DEVELOPER=1. Formula can't be installed directly from a path, even if developer mode is on.

Comment on lines +672 to +673
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using placeholder values for git configuration in CI/CD pipelines is not ideal. Consider using environment variables or more descriptive values like 'ci@azure-cli.local' and 'Azure CLI CI' to better reflect the automated nature of these commits.

Suggested change
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global user.email "ci@azure-cli.local"
git config --global user.name "Azure CLI CI"

Copilot uses AI. Check for mistakes.
brew tap-new dev/azure-cli
cp $SYSTEM_ARTIFACTSDIRECTORY/homebrew/azure-cli.rb $(brew --repository)/Library/Taps/dev/homebrew-azure-cli/Formula/
brew install --build-from-source dev/homebrew-azure-cli/azure-cli
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--build-from-source is required. Otherwise, brew tries to install azure-cli from core repo.

brew install dev/homebrew-azure-cli/azure-cli
==> Fetching downloads for: azure-cli
==> Downloading https://ghcr.io/v2/homebrew/core/azure-cli/manifests/2.77.0
==> Fetching dev/azure-cli/azure-cli
==> Downloading https://ghcr.io/v2/homebrew/core/azure-cli/blobs/sha256:3722168cdfb5ee06e816a2d9e6644feb1e59a8ebe9dfe43858ba6f285b1b4c02
==> Installing azure-cli from dev/azure-cli
==> Pouring azure-cli--2.77.0.sonoma.bottle.tar.gz
🍺  /usr/local/Cellar/azure-cli/2.77.0: 16,043 files, 329.2MB
==> No outdated dependents to upgrade!


echo == Az Version ==
az --version
Expand Down