-
Notifications
You must be signed in to change notification settings - Fork 3.4k
{CI} Fix homebrew formula test by creating dummy homebrew tap #32162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||||||
| git config --global user.email "you@example.com" | ||||||||||
| git config --global user.name "Your Name" | ||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
PS: Although
Comment on lines
+672
to
+673
|
||||||||||
| 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" |
There was a problem hiding this comment.
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!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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:
So creating a tap is the recommended way to install formula.
PS: Setting
HOMEBREW_DEVELOPER=1is a another workaround but the owner says it changes a lot of the behaviour of Homebrew: Homebrew/brew#20414 (comment).There was a problem hiding this comment.
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.