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
5 changes: 5 additions & 0 deletions scripts/release/homebrew/docker/formula_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ def update_formula() -> str:
upstream_sha = compute_sha256(HOMEBREW_UPSTREAM_URL)
text = re.sub('sha256 ".*"', 'sha256 "{}"'.format(upstream_sha), text, 1)
text = re.sub('.*revision.*\n', '', text, 1) # remove revision for previous version if exists

# include pip when creating venv, see https://github.com/Homebrew/brew/pull/15792
# this can be removed after Homebrew merges our PR
text = re.sub('system_site_packages: false', 'system_site_packages: false, without_pip: false', text, 1)
Copy link
Member

Choose a reason for hiding this comment

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

As formula_generate.py always updates the formula on Homebrew side, it requires a weird process that we always need 2 separate PRs:

  1. one to make the change,
  2. once the change is merged to Homebrew side's formula, one without the change

An alternative I can think of is to directly submit a PR to https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/azure-cli.rb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have to manually fix here as Homebrew pipeline is broken now.
Creating PR to homebrew is more convenient.


pack = None
packs_to_remove = set()
lines = text.split('\n')
Expand Down