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
1 change: 0 additions & 1 deletion .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Install tools
run: brew install actionlint shellcheck zizmor
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/autogenerated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
with:
core: false
cask: false
test-bot: true

- name: Cache Bundler RubyGems
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
with:
core: true
cask: true
test-bot: true

- run: brew install-bundler-gems --groups=all

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Determine runners to use for this job
id: determine-runners
Expand All @@ -59,7 +58,6 @@ jobs:
with:
core: false
cask: false
test-bot: true

- run: brew test-bot --only-cleanup-before
if: matrix.cleanup
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pkg-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Install Pandoc
run: brew install pandoc
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/rubydoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Checkout Homebrew/rubydoc.brew.sh
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
uses: Homebrew/actions/git-user-config@main
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sorbet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
if: github.event_name != 'pull_request'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/spdx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
uses: Homebrew/actions/git-user-config@main
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sponsors-maintainers-man-completions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
uses: Homebrew/actions/git-user-config@main
Expand Down
78 changes: 34 additions & 44 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Cache Bundler RubyGems
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand Down Expand Up @@ -89,7 +88,6 @@ jobs:
with:
core: true
cask: true
test-bot: true

- name: Cache Bundler RubyGems
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand Down Expand Up @@ -120,8 +118,7 @@ jobs:

- name: Run brew style on official taps
run: |
brew style homebrew/test-bot \
homebrew/portable-ruby \
brew style homebrew/portable-ruby \
homebrew/cask

formula-audit:
Expand All @@ -138,7 +135,6 @@ jobs:
with:
core: true
cask: false
test-bot: false

- name: Run brew readall on homebrew/core
run: brew readall --os=all --arch=all --aliases homebrew/core
Expand All @@ -161,7 +157,6 @@ jobs:
with:
core: true
cask: true
test-bot: false

- name: Run brew readall on all casks
run: brew readall --os=all --arch=all homebrew/cask
Expand All @@ -184,7 +179,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
uses: Homebrew/actions/git-user-config@main
Expand Down Expand Up @@ -219,7 +213,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Run brew update-tests
run: |
Expand Down Expand Up @@ -257,7 +250,6 @@ jobs:
# runners, and it's expensive to tap it.
core: ${{ runner.os == 'macOS' }}
cask: false
test-bot: false

- name: Cache Bundler RubyGems
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand Down Expand Up @@ -400,9 +392,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main
with:
core: false
core: true
cask: false
test-bot: true

- run: brew test-bot --only-cleanup-before

Expand Down Expand Up @@ -442,7 +433,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- run: brew test-bot --only-cleanup-before

Expand Down Expand Up @@ -488,35 +478,35 @@ jobs:
needs: syntax
if: github.repository_owner == 'Homebrew' && github.event_name != 'push'
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main

- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: ${{ steps.set-up-homebrew.outputs.repository-path }}/Library/Homebrew/formula-analytics/.python-version

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems

- run: brew formula-analytics --setup

- run: brew formula-analytics --install --json --days-ago=2
if: github.event.pull_request.head.repo.fork == false && (github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]')
env:
HOMEBREW_INFLUXDB_TOKEN: ${{ secrets.HOMEBREW_INFLUXDB_READ_TOKEN }}

- run: brew generate-analytics-api
if: github.event.pull_request.head.repo.fork == false && (github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]')
env:
HOMEBREW_INFLUXDB_TOKEN: ${{ secrets.HOMEBREW_INFLUXDB_READ_TOKEN }}
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main

- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: ${{ steps.set-up-homebrew.outputs.repository-path }}/Library/Homebrew/formula-analytics/.python-version

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems

- run: brew formula-analytics --setup

- run: brew formula-analytics --install --json --days-ago=2
if: github.event.pull_request.head.repo.fork == false && (github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]')
env:
HOMEBREW_INFLUXDB_TOKEN: ${{ secrets.HOMEBREW_INFLUXDB_READ_TOKEN }}

- run: brew generate-analytics-api
if: github.event.pull_request.head.repo.fork == false && (github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]')
env:
HOMEBREW_INFLUXDB_TOKEN: ${{ secrets.HOMEBREW_INFLUXDB_READ_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/vendor-gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
if: github.event_name == 'workflow_dispatch'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/vendor-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
with:
core: false
cask: false
test-bot: false

- name: Install Bundler RubyGems
run: brew install-bundler-gems --groups=all
Expand Down
39 changes: 0 additions & 39 deletions Library/Homebrew/brew.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,45 +120,6 @@
ENV["HOMEBREW_#{env}"] = Object.const_get(:"HOMEBREW_#{env}").to_s
end
exec "brew-#{cmd}", *ARGV
else
require "tap"

possible_tap = OFFICIAL_CMD_TAPS.find { |_, cmds| cmds.include?(cmd) }
possible_tap = Tap.fetch(possible_tap.first) if possible_tap

if !possible_tap ||
possible_tap.installed? ||
(blocked_tap = Tap.untapped_official_taps.include?(possible_tap.name))
if blocked_tap
Utils::Output.onoe <<~EOS
`brew #{cmd}` is unavailable because #{possible_tap.name} was manually untapped.
Run `brew tap #{possible_tap.name}` to reenable `brew #{cmd}`.
EOS
end
# Check for cask explicitly because it's very common in old guides
if cmd == "cask"
Utils::Output.odie "`brew cask` is no longer a `brew` command. Use `brew <command> --cask` instead."
end
Utils::Output.odie "Unknown command: brew #{cmd}"
end

# Unset HOMEBREW_HELP to avoid confusing the tap
with_env HOMEBREW_HELP: nil do
tap_commands = []
if (File.exist?("/.dockerenv") ||
Homebrew.running_as_root? ||
((cgroup = Utils.popen_read("cat", "/proc/1/cgroup").presence) &&
%w[azpl_job actions_job docker garden kubepods].none? { |type| cgroup.include?(type) })) &&
Homebrew.running_as_root_but_not_owned_by_root?
tap_commands += %W[/usr/bin/sudo -u ##{Homebrew.owner_uid}]
end
quiet_arg = args.quiet? ? "--quiet" : nil
tap_commands += [HOMEBREW_BREW_FILE, "tap", *quiet_arg, possible_tap.name]
safe_system(*tap_commands)
end

ARGV << "--help" if help_flag
exec HOMEBREW_BREW_FILE, cmd, *ARGV
end
rescue UsageError => e
require "help"
Expand Down
10 changes: 0 additions & 10 deletions Library/Homebrew/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@ def self.internal_developer_commands_paths
find_commands HOMEBREW_DEV_CMD_PATH
end

def self.official_external_commands_paths(quiet:)
require "tap"

OFFICIAL_CMD_TAPS.flat_map do |tap_name, cmds|
tap = Tap.fetch(tap_name)
tap.install(quiet:) unless tap.installed?
cmds.map { external_ruby_v2_cmd_path(_1) }.compact
end
end

def self.internal_commands
find_internal_commands(HOMEBREW_CMD_PATH).map(&:to_s)
end
Expand Down
9 changes: 1 addition & 8 deletions Library/Homebrew/dev-cmd/contributions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ class Contributions < AbstractCommand
Homebrew/homebrew-core
Homebrew/homebrew-cask
].freeze, T::Array[String])
ALL_REPOS = T.let([
*PRIMARY_REPOS,
*OFFICIAL_CMD_TAPS.keys,
].freeze, T::Array[String])
CONTRIBUTION_TYPES = T.let({
merged_pr_author: "merged PR author",
approved_pr_review: "approved PR reviewer",
Expand All @@ -37,8 +33,7 @@ class Contributions < AbstractCommand
"All repositories must be under the same user or organisation. " \
"Omitting this flag, or specifying `--repositories=primary`, searches only the " \
"main repositories: `Homebrew/brew`, `Homebrew/homebrew-core`, " \
"`Homebrew/homebrew-cask`. Specifying `--repositories=all` searches all " \
"non-deprecated Homebrew repositories. "
"`Homebrew/homebrew-cask`."
flag "--organisation=", "--organization=", "--org=",
description: "Specify the organisation to populate sources repositories from. " \
"Omitting this flag searches the Homebrew primary repositories."
Expand Down Expand Up @@ -96,8 +91,6 @@ def run
case first_repository
when "primary"
PRIMARY_REPOS
when "all"
ALL_REPOS
else
Array(first_repository)
end
Expand Down
Loading
Loading