Automate sponsors updates

- Add sponsors updating to the existing man/completion/maintainer update workflow
- Hide/deprecated --fail-if-not-changed arguments and make them default behaviour
- Rename man-completions workflow to sponsors-maintainers-man-completions for consistency
- Make output and exit codes more consistent between these updating commands
- Fix maintainers updates not always being committed correctly
This commit is contained in:
Mike McQuaid 2022-09-02 08:24:33 +01:00
parent 798e1b9d6f
commit af6165aab7
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829
16 changed files with 130 additions and 128 deletions

View File

@ -46,12 +46,13 @@ jobs:
if git ls-remote --exit-code --heads origin "${BRANCH}" if git ls-remote --exit-code --heads origin "${BRANCH}"
then then
git checkout "${BRANCH}" git checkout "${BRANCH}"
git reset --hard origin/master git checkout "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet"
else else
git checkout --no-track -B "${BRANCH}" origin/master git checkout --no-track -B "${BRANCH}" origin/master
fi fi
if brew typecheck --update --fail-if-not-changed brew typecheck --update
if ! git diff --stat --exit-code "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet"
then then
git add "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet" git add "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet"
git commit -m "sorbet: Update RBI files." \ git commit -m "sorbet: Update RBI files." \

View File

@ -42,12 +42,12 @@ jobs:
if git ls-remote --exit-code --heads origin "${BRANCH}" if git ls-remote --exit-code --heads origin "${BRANCH}"
then then
git checkout "${BRANCH}" git checkout "${BRANCH}"
git reset --hard origin/master git checkout "${GITHUB_WORKSPACE}/Library/Homebrew/data/spdx"
else else
git checkout --no-track -B "${BRANCH}" origin/master git checkout --no-track -B "${BRANCH}" origin/master
fi fi
if brew update-license-data --fail-if-not-changed if brew update-license-data
then then
git add "${GITHUB_WORKSPACE}/Library/Homebrew/data/spdx" git add "${GITHUB_WORKSPACE}/Library/Homebrew/data/spdx"
git commit -m "spdx: update license data." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/spdx.yml)." git commit -m "spdx: update license data." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/spdx.yml)."

View File

@ -1,9 +1,9 @@
name: Update maintainers, manpage and completions name: Update sponsors, maintainers, manpage and completions
on: on:
push: push:
paths: paths:
- .github/workflows/update-man-completions.yml - .github/workflows/sponsors-maintainers-man-completions.yml
- README.md - README.md
- Library/Homebrew/cmd/** - Library/Homebrew/cmd/**
- Library/Homebrew/dev-cmd/** - Library/Homebrew/dev-cmd/**
@ -22,7 +22,7 @@ permissions:
contents: read contents: read
jobs: jobs:
update-manpage: updates:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'Homebrew/brew' if: github.repository == 'Homebrew/brew'
steps: steps:
@ -39,35 +39,56 @@ jobs:
with: with:
signing_key: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY }} signing_key: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY }}
- name: Update maintainers, manpage and completions - name: Update sponsors, maintainers, manpage and completions
id: update id: update
run: | run: |
git fetch origin git fetch origin
BRANCH=update-man-completions BRANCH=sponsors-maintainers-man-completions
echo "::set-output name=branch::${BRANCH}" echo "::set-output name=branch::${BRANCH}"
if git ls-remote --exit-code --heads origin "${BRANCH}" if git ls-remote --exit-code --heads origin "${BRANCH}"
then then
git checkout "${BRANCH}" git checkout "${BRANCH}"
git reset --hard origin/master git checkout "${GITHUB_WORKSPACE}/README.md" \
"${GITHUB_WORKSPACE}/docs/Manpage.md" \
"${GITHUB_WORKSPACE}/manpages/brew.1" \
"${GITHUB_WORKSPACE}/completions"
else else
git checkout --no-track -B "${BRANCH}" origin/master git checkout --no-track -B "${BRANCH}" origin/master
fi fi
if [[ "${{github.event_name}}" != "push" ]] if brew update-maintainers
then then
brew update-maintainers git add "${GITHUB_WORKSPACE}/README.md" \
"${GITHUB_WORKSPACE}/docs/Manpage.md" \
"${GITHUB_WORKSPACE}/manpages/brew.1"
git commit -m "Update maintainers." \
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow."
COMMITTED=true
fi fi
if brew generate-man-completions --fail-if-not-changed if brew update-sponsors
then
git add "${GITHUB_WORKSPACE}/README.md"
git commit -m "Update sponsors." \
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow."
COMMITTED=true
fi
if brew generate-man-completions
then then
git add "${GITHUB_WORKSPACE}/README.md" \ git add "${GITHUB_WORKSPACE}/README.md" \
"${GITHUB_WORKSPACE}/docs/Manpage.md" \ "${GITHUB_WORKSPACE}/docs/Manpage.md" \
"${GITHUB_WORKSPACE}/manpages/brew.1" \ "${GITHUB_WORKSPACE}/manpages/brew.1" \
"${GITHUB_WORKSPACE}/completions" "${GITHUB_WORKSPACE}/completions"
git commit -m "Update maintainers, manpage and completions." \ git commit -m "Update manpage and completions." \
-m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/update-man-completions.yml) workflow." -m "Autogenerated by the [update-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow."
COMMITTED=true
fi
if [[ -n "$COMMITTED" ]]
then
echo "::set-output name=committed::true" echo "::set-output name=committed::true"
PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")" PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")"
if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]] if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]]

View File

@ -60,16 +60,12 @@ jobs:
GEM_NAME: ${{ steps.checkout.outputs.gem_name }} GEM_NAME: ${{ steps.checkout.outputs.gem_name }}
HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }} HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
run: | run: |
set -u brew typecheck --update
if ! git diff --stat --exit-code "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet"
if brew typecheck --update --fail-if-not-changed
then then
if git add Library/Homebrew/sorbet git add "${GITHUB_WORKSPACE}/Library/Homebrew/sorbet"
then git commit -m "Update RBI files for ${GEM_NAME}." \
git commit -m "Update RBI files for ${GEM_NAME}." -m "Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gemss.yml) workflow."
fi
git reset --hard
fi fi
- name: Push to pull request - name: Push to pull request

View File

@ -23,6 +23,7 @@ module Homebrew
Generate Homebrew's manpages and shell completions. Generate Homebrew's manpages and shell completions.
EOS EOS
switch "--fail-if-not-changed", switch "--fail-if-not-changed",
hidden: true,
description: "Return a failing status code if no changes are detected in the manpage outputs. " \ description: "Return a failing status code if no changes are detected in the manpage outputs. " \
"This can be used to notify CI when the manpages are out of date. Additionally, " \ "This can be used to notify CI when the manpages are out of date. Additionally, " \
"the date used in new manpages will match those in the existing manpages (to allow " \ "the date used in new manpages will match those in the existing manpages (to allow " \
@ -34,27 +35,30 @@ module Homebrew
def generate_man_completions def generate_man_completions
args = generate_man_completions_args.parse args = generate_man_completions_args.parse
odeprecated "brew generate-man-completions --fail-if-not-changed" if args.fail_if_not_changed?
Commands.rebuild_internal_commands_completion_list Commands.rebuild_internal_commands_completion_list
regenerate_man_pages(preserve_date: args.fail_if_not_changed?, quiet: args.quiet?) regenerate_man_pages(quiet: args.quiet?)
Completions.update_shell_completions! Completions.update_shell_completions!
diff = system_command "git", args: [ diff = system_command "git", args: [
"-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "docs/Manpage.md", "manpages", "completions" "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "docs/Manpage.md", "manpages", "completions"
] ]
if diff.status.success?
return unless diff.status.success? ofail "No changes to manpage or completions."
else
puts "No changes to manpage or completions output detected." puts "Manpage and completions updated."
Homebrew.failed = true if args.fail_if_not_changed? end
end end
def regenerate_man_pages(preserve_date:, quiet:) # TODO: move this method and all called functions to manpages.rb
def regenerate_man_pages(quiet:)
Homebrew.install_bundler_gems! Homebrew.install_bundler_gems!
markup = build_man_page(quiet: quiet) markup = build_man_page(quiet: quiet)
convert_man_page(markup, TARGET_DOC_PATH/"Manpage.md", preserve_date: preserve_date) convert_man_page(markup, TARGET_DOC_PATH/"Manpage.md")
markup = I18n.transliterate(markup, locale: :en) markup = I18n.transliterate(markup, locale: :en)
convert_man_page(markup, TARGET_MAN_PATH/"brew.1", preserve_date: preserve_date) convert_man_page(markup, TARGET_MAN_PATH/"brew.1")
end end
def build_man_page(quiet:) def build_man_page(quiet:)
@ -94,13 +98,13 @@ module Homebrew
path.basename.to_s.sub(/\.(rb|sh)$/, "").sub(/^--/, "~~") path.basename.to_s.sub(/\.(rb|sh)$/, "").sub(/^--/, "~~")
end end
def convert_man_page(markup, target, preserve_date:) def convert_man_page(markup, target)
manual = target.basename(".1") manual = target.basename(".1")
organisation = "Homebrew" organisation = "Homebrew"
# Set the manpage date to the existing one if we're checking for changes. # Set the manpage date to the existing one if we're updating.
# This avoids the only change being e.g. a new date. # This avoids the only change being e.g. a new date.
date = if preserve_date && target.extname == ".1" && target.exist? date = if target.extname == ".1" && target.exist?
/"(\d{1,2})" "([A-Z][a-z]+) (\d{4})" "#{organisation}" "#{manual}"/ =~ target.read /"(\d{1,2})" "([A-Z][a-z]+) (\d{4})" "#{organisation}" "#{manual}"/ =~ target.read
Date.parse("#{Regexp.last_match(1)} #{Regexp.last_match(2)} #{Regexp.last_match(3)}") Date.parse("#{Regexp.last_match(1)} #{Regexp.last_match(2)} #{Regexp.last_match(3)}")
else else

View File

@ -27,6 +27,7 @@ module Homebrew
depends_on: "--update", depends_on: "--update",
description: "Try upgrading `typed` sigils." description: "Try upgrading `typed` sigils."
switch "--fail-if-not-changed", switch "--fail-if-not-changed",
hidden: true,
description: "Return a failing status code if all gems are up to date " \ description: "Return a failing status code if all gems are up to date " \
"and gem definitions do not need a tapioca update." "and gem definitions do not need a tapioca update."
flag "--dir=", flag "--dir=",
@ -51,6 +52,8 @@ module Homebrew
HOMEBREW_LIBRARY_PATH.cd do HOMEBREW_LIBRARY_PATH.cd do
if args.update? if args.update?
odeprecated "brew typecheck --update --fail-if-not-changed" if args.fail_if_not_changed?
excluded_gems = [ excluded_gems = [
"did_you_mean", # RBI file is already provided by Sorbet "did_you_mean", # RBI file is already provided by Sorbet
"webrobots", # RBI file is bugged "webrobots", # RBI file is bugged
@ -100,8 +103,6 @@ module Homebrew
end end
end end
Homebrew.failed = system("git", "diff", "--stat", "--exit-code") if args.fail_if_not_changed?
return return
end end

View File

@ -3,9 +3,11 @@
require "cli/parser" require "cli/parser"
require "utils/spdx" require "utils/spdx"
require "system_command"
module Homebrew module Homebrew
extend T::Sig extend T::Sig
include SystemCommand::Mixin
module_function module_function
@ -16,6 +18,7 @@ module Homebrew
Update SPDX license data in the Homebrew repository. Update SPDX license data in the Homebrew repository.
EOS EOS
switch "--fail-if-not-changed", switch "--fail-if-not-changed",
hidden: true,
description: "Return a failing status code if current license data's version is the same as " \ description: "Return a failing status code if current license data's version is the same as " \
"the upstream. This can be used to notify CI when the SPDX license data is out of date." "the upstream. This can be used to notify CI when the SPDX license data is out of date."
@ -25,11 +28,16 @@ module Homebrew
def update_license_data def update_license_data
args = update_license_data_args.parse args = update_license_data_args.parse
ohai "Updating SPDX license data..." odeprecated "brew update-license-data --fail-if-not-changed" if args.fail_if_not_changed?
SPDX.download_latest_license_data! SPDX.download_latest_license_data!
return unless args.fail_if_not_changed? diff = system_command "git", args: [
"-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", SPDX::DATA_PATH
Homebrew.failed = system("git", "diff", "--stat", "--exit-code", SPDX::DATA_PATH) ]
if diff.status.success?
ofail "No changes to SPDX license data."
else
puts "SPDX license data updated."
end
end end
end end

View File

@ -3,6 +3,8 @@
require "cli/parser" require "cli/parser"
require "utils/github" require "utils/github"
# TODO: move function to manpages.rb and require that instead
require "dev-cmd/generate-man-completions" require "dev-cmd/generate-man-completions"
module Homebrew module Homebrew
@ -57,9 +59,10 @@ module Homebrew
"-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "README.md" "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "README.md"
] ]
if diff.status.success? if diff.status.success?
puts "No changes to list of maintainers." ofail "No changes to list of maintainers."
else else
Homebrew.regenerate_man_pages(preserve_date: true, quiet: true) # TODO: move function to manpages.rb and call that instead
Homebrew.regenerate_man_pages(quiet: true)
puts "List of maintainers updated in the README and the generated man pages." puts "List of maintainers updated in the README and the generated man pages."
end end
end end

View File

@ -13,7 +13,7 @@ module Homebrew
URL_TIER_AMOUNT = 1000 URL_TIER_AMOUNT = 1000
sig { returns(CLI::Parser) } sig { returns(CLI::Parser) }
def sponsors_args def update_sponsors_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
description <<~EOS description <<~EOS
Update the list of GitHub Sponsors in the `Homebrew/brew` README. Update the list of GitHub Sponsors in the `Homebrew/brew` README.
@ -35,8 +35,8 @@ module Homebrew
"https://github.com/#{s["login"]}" "https://github.com/#{s["login"]}"
end end
def sponsors def update_sponsors
sponsors_args.parse update_sponsors_args.parse
named_sponsors = [] named_sponsors = []
logo_sponsors = [] logo_sponsors = []
@ -68,7 +68,7 @@ module Homebrew
"-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "README.md" "-C", HOMEBREW_REPOSITORY, "diff", "--exit-code", "README.md"
] ]
if diff.status.success? if diff.status.success?
puts "No changes to list of sponsors." ofail "No changes to list of sponsors."
else else
puts "List of sponsors updated in the README." puts "List of sponsors updated in the README."
end end

View File

@ -3,6 +3,6 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew sponsors" do describe "brew update-sponsors" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
end end

View File

@ -976,7 +976,6 @@ _brew_generate_man_completions() {
-*) -*)
__brewcomp " __brewcomp "
--debug --debug
--fail-if-not-changed
--help --help
--quiet --quiet
--verbose --verbose
@ -1880,22 +1879,6 @@ _brew_sh() {
__brew_complete_files __brew_complete_files
} }
_brew_sponsors() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in
-*)
__brewcomp "
--debug
--help
--quiet
--verbose
"
return
;;
*)
esac
}
_brew_style() { _brew_style() {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in case "${cur}" in
@ -1993,7 +1976,6 @@ _brew_tc() {
--all --all
--debug --debug
--dir --dir
--fail-if-not-changed
--file --file
--fix --fix
--help --help
@ -2062,7 +2044,6 @@ _brew_typecheck() {
--all --all
--debug --debug
--dir --dir
--fail-if-not-changed
--file --file
--fix --fix
--help --help
@ -2262,7 +2243,6 @@ _brew_update_license_data() {
-*) -*)
__brewcomp " __brewcomp "
--debug --debug
--fail-if-not-changed
--help --help
--quiet --quiet
--verbose --verbose
@ -2331,6 +2311,22 @@ _brew_update_report() {
esac esac
} }
_brew_update_sponsors() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in
-*)
__brewcomp "
--debug
--help
--quiet
--verbose
"
return
;;
*)
esac
}
_brew_update_test() { _brew_update_test() {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in case "${cur}" in
@ -2552,7 +2548,6 @@ _brew() {
ruby) _brew_ruby ;; ruby) _brew_ruby ;;
search) _brew_search ;; search) _brew_search ;;
sh) _brew_sh ;; sh) _brew_sh ;;
sponsors) _brew_sponsors ;;
style) _brew_style ;; style) _brew_style ;;
tap) _brew_tap ;; tap) _brew_tap ;;
tap-info) _brew_tap_info ;; tap-info) _brew_tap_info ;;
@ -2574,6 +2569,7 @@ _brew() {
update-maintainers) _brew_update_maintainers ;; update-maintainers) _brew_update_maintainers ;;
update-python-resources) _brew_update_python_resources ;; update-python-resources) _brew_update_python_resources ;;
update-report) _brew_update_report ;; update-report) _brew_update_report ;;
update-sponsors) _brew_update_sponsors ;;
update-test) _brew_update_test ;; update-test) _brew_update_test ;;
upgrade) _brew_upgrade ;; upgrade) _brew_upgrade ;;
uses) _brew_uses ;; uses) _brew_uses ;;

View File

@ -716,7 +716,6 @@ __fish_brew_complete_arg 'formula' -a '(__fish_brew_suggest_formulae_all)'
__fish_brew_complete_cmd 'generate-man-completions' 'Generate Homebrew\'s manpages and shell completions' __fish_brew_complete_cmd 'generate-man-completions' 'Generate Homebrew\'s manpages and shell completions'
__fish_brew_complete_arg 'generate-man-completions' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'generate-man-completions' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'generate-man-completions' -l fail-if-not-changed -d 'Return a failing status code if no changes are detected in the manpage outputs. This can be used to notify CI when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date)'
__fish_brew_complete_arg 'generate-man-completions' -l help -d 'Show this message' __fish_brew_complete_arg 'generate-man-completions' -l help -d 'Show this message'
__fish_brew_complete_arg 'generate-man-completions' -l quiet -d 'Make some output more quiet' __fish_brew_complete_arg 'generate-man-completions' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'generate-man-completions' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'generate-man-completions' -l verbose -d 'Make some output more verbose'
@ -1289,13 +1288,6 @@ __fish_brew_complete_arg 'sh' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'sh' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'sh' -l verbose -d 'Make some output more verbose'
__fish_brew_complete_cmd 'sponsors' 'Update the list of GitHub Sponsors in the `Homebrew/brew` README'
__fish_brew_complete_arg 'sponsors' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'sponsors' -l help -d 'Show this message'
__fish_brew_complete_arg 'sponsors' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'sponsors' -l verbose -d 'Make some output more verbose'
__fish_brew_complete_cmd 'style' 'Check formulae or files for conformance to Homebrew style guidelines' __fish_brew_complete_cmd 'style' 'Check formulae or files for conformance to Homebrew style guidelines'
__fish_brew_complete_arg 'style' -l cask -d 'Treat all named arguments as casks' __fish_brew_complete_arg 'style' -l cask -d 'Treat all named arguments as casks'
__fish_brew_complete_arg 'style' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'style' -l debug -d 'Display any debugging information'
@ -1352,7 +1344,6 @@ __fish_brew_complete_cmd 'tc' 'Check for typechecking errors using Sorbet'
__fish_brew_complete_arg 'tc' -l all -d 'Regenerate all RBI files rather than just updated gems' __fish_brew_complete_arg 'tc' -l all -d 'Regenerate all RBI files rather than just updated gems'
__fish_brew_complete_arg 'tc' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'tc' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'tc' -l dir -d 'Typecheck all files in a specific directory' __fish_brew_complete_arg 'tc' -l dir -d 'Typecheck all files in a specific directory'
__fish_brew_complete_arg 'tc' -l fail-if-not-changed -d 'Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update'
__fish_brew_complete_arg 'tc' -l file -d 'Typecheck a single file' __fish_brew_complete_arg 'tc' -l file -d 'Typecheck a single file'
__fish_brew_complete_arg 'tc' -l fix -d 'Automatically fix type errors' __fish_brew_complete_arg 'tc' -l fix -d 'Automatically fix type errors'
__fish_brew_complete_arg 'tc' -l help -d 'Show this message' __fish_brew_complete_arg 'tc' -l help -d 'Show this message'
@ -1394,7 +1385,6 @@ __fish_brew_complete_cmd 'typecheck' 'Check for typechecking errors using Sorbet
__fish_brew_complete_arg 'typecheck' -l all -d 'Regenerate all RBI files rather than just updated gems' __fish_brew_complete_arg 'typecheck' -l all -d 'Regenerate all RBI files rather than just updated gems'
__fish_brew_complete_arg 'typecheck' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'typecheck' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'typecheck' -l dir -d 'Typecheck all files in a specific directory' __fish_brew_complete_arg 'typecheck' -l dir -d 'Typecheck all files in a specific directory'
__fish_brew_complete_arg 'typecheck' -l fail-if-not-changed -d 'Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update'
__fish_brew_complete_arg 'typecheck' -l file -d 'Typecheck a single file' __fish_brew_complete_arg 'typecheck' -l file -d 'Typecheck a single file'
__fish_brew_complete_arg 'typecheck' -l fix -d 'Automatically fix type errors' __fish_brew_complete_arg 'typecheck' -l fix -d 'Automatically fix type errors'
__fish_brew_complete_arg 'typecheck' -l help -d 'Show this message' __fish_brew_complete_arg 'typecheck' -l help -d 'Show this message'
@ -1504,7 +1494,6 @@ __fish_brew_complete_arg 'update' -l verbose -d 'Print the directories checked a
__fish_brew_complete_cmd 'update-license-data' 'Update SPDX license data in the Homebrew repository' __fish_brew_complete_cmd 'update-license-data' 'Update SPDX license data in the Homebrew repository'
__fish_brew_complete_arg 'update-license-data' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'update-license-data' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'update-license-data' -l fail-if-not-changed -d 'Return a failing status code if current license data\'s version is the same as the upstream. This can be used to notify CI when the SPDX license data is out of date'
__fish_brew_complete_arg 'update-license-data' -l help -d 'Show this message' __fish_brew_complete_arg 'update-license-data' -l help -d 'Show this message'
__fish_brew_complete_arg 'update-license-data' -l quiet -d 'Make some output more quiet' __fish_brew_complete_arg 'update-license-data' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'update-license-data' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'update-license-data' -l verbose -d 'Make some output more verbose'
@ -1541,6 +1530,13 @@ __fish_brew_complete_arg 'update-report' -l quiet -d 'Make some output more quie
__fish_brew_complete_arg 'update-report' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'update-report' -l verbose -d 'Make some output more verbose'
__fish_brew_complete_cmd 'update-sponsors' 'Update the list of GitHub Sponsors in the `Homebrew/brew` README'
__fish_brew_complete_arg 'update-sponsors' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'update-sponsors' -l help -d 'Show this message'
__fish_brew_complete_arg 'update-sponsors' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'update-sponsors' -l verbose -d 'Make some output more verbose'
__fish_brew_complete_cmd 'update-test' 'Run a test of `brew update` with a new repository clone' __fish_brew_complete_cmd 'update-test' 'Run a test of `brew update` with a new repository clone'
__fish_brew_complete_arg 'update-test' -l before -d 'Use the commit at the specified date as the start commit' __fish_brew_complete_arg 'update-test' -l before -d 'Use the commit at the specified date as the start commit'
__fish_brew_complete_arg 'update-test' -l commit -d 'Use the specified commit as the start commit' __fish_brew_complete_arg 'update-test' -l commit -d 'Use the specified commit as the start commit'

View File

@ -79,7 +79,6 @@ ruby
search search
sh sh
shellenv shellenv
sponsors
style style
tap tap
tap-info tap-info
@ -100,6 +99,7 @@ update-license-data
update-maintainers update-maintainers
update-python-resources update-python-resources
update-reset update-reset
update-sponsors
update-test update-test
upgrade upgrade
uses uses

View File

@ -196,7 +196,6 @@ __brew_internal_commands() {
'search:Perform a substring search of cask tokens and formula names for text' 'search:Perform a substring search of cask tokens and formula names for text'
'sh:Enter an interactive shell for Homebrew'\''s build environment' 'sh:Enter an interactive shell for Homebrew'\''s build environment'
'shellenv:Print export statements' 'shellenv:Print export statements'
'sponsors:Update the list of GitHub Sponsors in the `Homebrew/brew` README'
'style:Check formulae or files for conformance to Homebrew style guidelines' 'style:Check formulae or files for conformance to Homebrew style guidelines'
'tap:Tap a formula repository' 'tap:Tap a formula repository'
'tap-info:Show detailed information about one or more taps' 'tap-info:Show detailed information about one or more taps'
@ -216,6 +215,7 @@ __brew_internal_commands() {
'update-python-resources:Update versions for PyPI resource blocks in formula' 'update-python-resources:Update versions for PyPI resource blocks in formula'
'update-report:The Ruby implementation of `brew update`' 'update-report:The Ruby implementation of `brew update`'
'update-reset:Fetch and reset Homebrew and all tap repositories (or any specified repository) using `git`(1) to their latest `origin/HEAD`' 'update-reset:Fetch and reset Homebrew and all tap repositories (or any specified repository) using `git`(1) to their latest `origin/HEAD`'
'update-sponsors:Update the list of GitHub Sponsors in the `Homebrew/brew` README'
'update-test:Run a test of `brew update` with a new repository clone' 'update-test:Run a test of `brew update` with a new repository clone'
'upgrade:Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options' 'upgrade:Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options'
'uses:Show formulae and casks that specify formula as a dependency; that is, show dependents of formula' 'uses:Show formulae and casks that specify formula as a dependency; that is, show dependents of formula'
@ -882,7 +882,6 @@ _brew_formula() {
_brew_generate_man_completions() { _brew_generate_man_completions() {
_arguments \ _arguments \
'--debug[Display any debugging information]' \ '--debug[Display any debugging information]' \
'--fail-if-not-changed[Return a failing status code if no changes are detected in the manpage outputs. This can be used to notify CI when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date)]' \
'--help[Show this message]' \ '--help[Show this message]' \
'--quiet[Make some output more quiet]' \ '--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' '--verbose[Make some output more verbose]'
@ -1570,15 +1569,6 @@ _brew_sh() {
'*::file:__brew_formulae_or_ruby_files' '*::file:__brew_formulae_or_ruby_files'
} }
# brew sponsors
_brew_sponsors() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew style # brew style
_brew_style() { _brew_style() {
_arguments \ _arguments \
@ -1653,7 +1643,6 @@ _brew_tc() {
'--all[Regenerate all RBI files rather than just updated gems]' \ '--all[Regenerate all RBI files rather than just updated gems]' \
'--debug[Display any debugging information]' \ '--debug[Display any debugging information]' \
'(--file)--dir[Typecheck all files in a specific directory]' \ '(--file)--dir[Typecheck all files in a specific directory]' \
'--fail-if-not-changed[Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update]' \
'(--dir)--file[Typecheck a single file]' \ '(--dir)--file[Typecheck a single file]' \
'--fix[Automatically fix type errors]' \ '--fix[Automatically fix type errors]' \
'--help[Show this message]' \ '--help[Show this message]' \
@ -1702,7 +1691,6 @@ _brew_typecheck() {
'--all[Regenerate all RBI files rather than just updated gems]' \ '--all[Regenerate all RBI files rather than just updated gems]' \
'--debug[Display any debugging information]' \ '--debug[Display any debugging information]' \
'(--file)--dir[Typecheck all files in a specific directory]' \ '(--file)--dir[Typecheck all files in a specific directory]' \
'--fail-if-not-changed[Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update]' \
'(--dir)--file[Typecheck a single file]' \ '(--dir)--file[Typecheck a single file]' \
'--fix[Automatically fix type errors]' \ '--fix[Automatically fix type errors]' \
'--help[Show this message]' \ '--help[Show this message]' \
@ -1841,7 +1829,6 @@ _brew_update() {
_brew_update_license_data() { _brew_update_license_data() {
_arguments \ _arguments \
'--debug[Display any debugging information]' \ '--debug[Display any debugging information]' \
'--fail-if-not-changed[Return a failing status code if current license data'\''s version is the same as the upstream. This can be used to notify CI when the SPDX license data is out of date]' \
'--help[Show this message]' \ '--help[Show this message]' \
'--quiet[Make some output more quiet]' \ '--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' '--verbose[Make some output more verbose]'
@ -1885,6 +1872,15 @@ _brew_update_report() {
'--verbose[Make some output more verbose]' '--verbose[Make some output more verbose]'
} }
# brew update-sponsors
_brew_update_sponsors() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew update-test # brew update-test
_brew_update_test() { _brew_update_test() {
_arguments \ _arguments \

View File

@ -1198,13 +1198,10 @@ a formula from a tap that is not `homebrew/core` use its fully-qualified form of
Display the path where *`formula`* is located. Display the path where *`formula`* is located.
### `generate-man-completions` [*`--fail-if-not-changed`*] ### `generate-man-completions`
Generate Homebrew's manpages and shell completions. Generate Homebrew's manpages and shell completions.
* `--fail-if-not-changed`:
Return a failing status code if no changes are detected in the manpage outputs. This can be used to notify CI when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date).
### `install-bundler-gems` [*`--groups`*`=`] ### `install-bundler-gems` [*`--groups`*`=`]
Install Homebrew's Bundler gems. Install Homebrew's Bundler gems.
@ -1411,10 +1408,6 @@ which build systems would not find otherwise.
* `-c`, `--cmd`: * `-c`, `--cmd`:
Execute commands in a non-interactive shell. Execute commands in a non-interactive shell.
### `sponsors`
Update the list of GitHub Sponsors in the `Homebrew/brew` README.
### `style` [*`options`*] [*`file`*|*`tap`*|*`formula`*|*`cask`* ...] ### `style` [*`options`*] [*`file`*|*`tap`*|*`formula`*|*`cask`* ...]
Check formulae or files for conformance to Homebrew style guidelines. Check formulae or files for conformance to Homebrew style guidelines.
@ -1503,8 +1496,6 @@ Check for typechecking errors using Sorbet.
Regenerate all RBI files rather than just updated gems. Regenerate all RBI files rather than just updated gems.
* `--suggest-typed`: * `--suggest-typed`:
Try upgrading `typed` sigils. Try upgrading `typed` sigils.
* `--fail-if-not-changed`:
Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update.
* `--dir`: * `--dir`:
Typecheck all files in a specific directory. Typecheck all files in a specific directory.
* `--file`: * `--file`:
@ -1537,13 +1528,10 @@ working directory.
* `-f`, `--force`: * `-f`, `--force`:
Overwrite the destination directory if it already exists. Overwrite the destination directory if it already exists.
### `update-license-data` [*`--fail-if-not-changed`*] ### `update-license-data`
Update SPDX license data in the Homebrew repository. Update SPDX license data in the Homebrew repository.
* `--fail-if-not-changed`:
Return a failing status code if current license data's version is the same as the upstream. This can be used to notify CI when the SPDX license data is out of date.
### `update-maintainers` ### `update-maintainers`
Update the list of maintainers in the `Homebrew/brew` README. Update the list of maintainers in the `Homebrew/brew` README.
@ -1567,6 +1555,10 @@ Update versions for PyPI resource blocks in *`formula`*.
* `--exclude-packages`: * `--exclude-packages`:
Exclude these packages when finding resources. Exclude these packages when finding resources.
### `update-sponsors`
Update the list of GitHub Sponsors in the `Homebrew/brew` README.
### `update-test` [*`options`*] ### `update-test` [*`options`*]
Run a test of `brew update` with a new repository clone. Run a test of `brew update` with a new repository clone.

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BREW" "1" "August 2022" "Homebrew" "brew" .TH "BREW" "1" "September 2022" "Homebrew" "brew"
. .
.SH "NAME" .SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS (or Linux) \fBbrew\fR \- The Missing Package Manager for macOS (or Linux)
@ -1712,13 +1712,9 @@ Overwrite the destination formula if it already exists\.
.SS "\fBformula\fR \fIformula\fR [\.\.\.]" .SS "\fBformula\fR \fIformula\fR [\.\.\.]"
Display the path where \fIformula\fR is located\. Display the path where \fIformula\fR is located\.
. .
.SS "\fBgenerate\-man\-completions\fR [\fI\-\-fail\-if\-not\-changed\fR]" .SS "\fBgenerate\-man\-completions\fR"
Generate Homebrew\'s manpages and shell completions\. Generate Homebrew\'s manpages and shell completions\.
. .
.TP
\fB\-\-fail\-if\-not\-changed\fR
Return a failing status code if no changes are detected in the manpage outputs\. This can be used to notify CI when the manpages are out of date\. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date)\.
.
.SS "\fBinstall\-bundler\-gems\fR [\fI\-\-groups\fR\fB=\fR]" .SS "\fBinstall\-bundler\-gems\fR [\fI\-\-groups\fR\fB=\fR]"
Install Homebrew\'s Bundler gems\. Install Homebrew\'s Bundler gems\.
. .
@ -2011,9 +2007,6 @@ Use the standard \fBPATH\fR instead of superenv\'s when \fBstd\fR is passed\.
\fB\-c\fR, \fB\-\-cmd\fR \fB\-c\fR, \fB\-\-cmd\fR
Execute commands in a non\-interactive shell\. Execute commands in a non\-interactive shell\.
. .
.SS "\fBsponsors\fR"
Update the list of GitHub Sponsors in the \fBHomebrew/brew\fR README\.
.
.SS "\fBstyle\fR [\fIoptions\fR] [\fIfile\fR|\fItap\fR|\fIformula\fR|\fIcask\fR \.\.\.]" .SS "\fBstyle\fR [\fIoptions\fR] [\fIfile\fR|\fItap\fR|\fIformula\fR|\fIcask\fR \.\.\.]"
Check formulae or files for conformance to Homebrew style guidelines\. Check formulae or files for conformance to Homebrew style guidelines\.
. .
@ -2148,10 +2141,6 @@ Regenerate all RBI files rather than just updated gems\.
Try upgrading \fBtyped\fR sigils\. Try upgrading \fBtyped\fR sigils\.
. .
.TP .TP
\fB\-\-fail\-if\-not\-changed\fR
Return a failing status code if all gems are up to date and gem definitions do not need a tapioca update\.
.
.TP
\fB\-\-dir\fR \fB\-\-dir\fR
Typecheck all files in a specific directory\. Typecheck all files in a specific directory\.
. .
@ -2197,13 +2186,9 @@ Initialise a Git repository in the unpacked source\. This is useful for creating
\fB\-f\fR, \fB\-\-force\fR \fB\-f\fR, \fB\-\-force\fR
Overwrite the destination directory if it already exists\. Overwrite the destination directory if it already exists\.
. .
.SS "\fBupdate\-license\-data\fR [\fI\-\-fail\-if\-not\-changed\fR]" .SS "\fBupdate\-license\-data\fR"
Update SPDX license data in the Homebrew repository\. Update SPDX license data in the Homebrew repository\.
. .
.TP
\fB\-\-fail\-if\-not\-changed\fR
Return a failing status code if current license data\'s version is the same as the upstream\. This can be used to notify CI when the SPDX license data is out of date\.
.
.SS "\fBupdate\-maintainers\fR" .SS "\fBupdate\-maintainers\fR"
Update the list of maintainers in the \fBHomebrew/brew\fR README\. Update the list of maintainers in the \fBHomebrew/brew\fR README\.
. .
@ -2238,6 +2223,9 @@ Include these additional packages when finding resources\.
\fB\-\-exclude\-packages\fR \fB\-\-exclude\-packages\fR
Exclude these packages when finding resources\. Exclude these packages when finding resources\.
. .
.SS "\fBupdate\-sponsors\fR"
Update the list of GitHub Sponsors in the \fBHomebrew/brew\fR README\.
.
.SS "\fBupdate\-test\fR [\fIoptions\fR]" .SS "\fBupdate\-test\fR [\fIoptions\fR]"
Run a test of \fBbrew update\fR with a new repository clone\. If no options are passed, use \fBorigin/master\fR as the start commit\. Run a test of \fBbrew update\fR with a new repository clone\. If no options are passed, use \fBorigin/master\fR as the start commit\.
. .