Merge pull request #17207 from razvanazamfirei/remove-cask-versions

homebrew/cask-versions: remove
This commit is contained in:
Miccal Matthews 2024-05-03 05:24:41 +08:00 committed by GitHub
commit 6768b64751
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 14 additions and 34 deletions

View File

@ -111,7 +111,6 @@ jobs:
brew tap homebrew/aliases brew tap homebrew/aliases
brew tap homebrew/bundle brew tap homebrew/bundle
brew tap homebrew/cask-fonts brew tap homebrew/cask-fonts
brew tap homebrew/cask-versions
brew tap homebrew/command-not-found brew tap homebrew/command-not-found
brew tap homebrew/formula-analytics brew tap homebrew/formula-analytics
brew tap homebrew/portable-ruby brew tap homebrew/portable-ruby
@ -134,8 +133,7 @@ jobs:
- name: Run brew style on cask taps - name: Run brew style on cask taps
run: | run: |
brew style homebrew/cask \ brew style homebrew/cask \
homebrew/cask-fonts \ homebrew/cask-fonts
homebrew/cask-versions
formula-audit: formula-audit:
name: formula audit name: formula audit
@ -177,16 +175,14 @@ jobs:
- name: Set up Homebrew all cask taps - name: Set up Homebrew all cask taps
run: | run: |
brew tap homebrew/cask-fonts brew tap homebrew/cask-fonts
brew tap homebrew/cask-versions
- name: Run brew readall on all casks - name: Run brew readall on all casks
run: brew readall --os=all --arch=all homebrew/cask homebrew/cask-fonts homebrew/cask-versions run: brew readall --os=all --arch=all homebrew/cask homebrew/cask-fonts
- name: Run brew audit --skip-style on casks - name: Run brew audit --skip-style on casks
run: | run: |
brew audit --skip-style --except=version --tap=homebrew/cask brew audit --skip-style --except=version --tap=homebrew/cask
brew audit --skip-style --except=version --tap=homebrew/cask-fonts brew audit --skip-style --except=version --tap=homebrew/cask-fonts
brew audit --skip-style --except=version --tap=homebrew/cask-versions
- name: Generate formula API - name: Generate formula API
run: brew generate-formula-api --dry-run run: brew generate-formula-api --dry-run

View File

@ -430,7 +430,7 @@ module Cask
add_error "cask token contains .app" if token.end_with? ".app" add_error "cask token contains .app" if token.end_with? ".app"
match_data = /-(?<designation>alpha|beta|rc|release-candidate)$/.match(cask.token) match_data = /-(?<designation>alpha|beta|rc|release-candidate)$/.match(cask.token)
if match_data && cask.tap&.official? && cask.tap != "homebrew/cask-versions" if match_data && cask.tap&.official?
add_error "cask token contains version designation '#{match_data[:designation]}'" add_error "cask token contains version designation '#{match_data[:designation]}'"
end end

View File

@ -135,7 +135,7 @@ module Cask
else else
<<~EOS <<~EOS
#{@cask} requires Java #{java_version}. You can install it with: #{@cask} requires Java #{java_version}. You can install it with:
brew install --cask homebrew/cask-versions/temurin#{java_version} brew install --cask temurin@#{java_version}
EOS EOS
end end
end end

View File

@ -4,7 +4,6 @@
OFFICIAL_CASK_TAPS = %w[ OFFICIAL_CASK_TAPS = %w[
cask cask
cask-fonts cask-fonts
cask-versions
].freeze ].freeze
OFFICIAL_CMD_TAPS = { OFFICIAL_CMD_TAPS = {
@ -20,6 +19,7 @@ DEPRECATED_OFFICIAL_TAPS = %w[
binary binary
cask-drivers cask-drivers
cask-eid cask-eid
cask-versions
completions completions
devel-only devel-only
dupes dupes

View File

@ -36,10 +36,10 @@ HOMEBREW_TAP_DIR_REGEX = T.let(
HOMEBREW_TAP_PATH_REGEX = T.let(Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{(?:/.*)?\Z}.source).freeze, Regexp) HOMEBREW_TAP_PATH_REGEX = T.let(Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{(?:/.*)?\Z}.source).freeze, Regexp)
# Match official cask taps, e.g `homebrew/cask`. # Match official cask taps, e.g `homebrew/cask`.
HOMEBREW_CASK_TAP_REGEX = T.let( HOMEBREW_CASK_TAP_REGEX = T.let(
%r{(?:([Cc]askroom)/(cask|versions)|([Hh]omebrew)/(?:homebrew-)?(cask|cask-[\w-]+))}, %r{(?:([Cc]askroom)/(cask)|([Hh]omebrew)/(?:homebrew-)?(cask|cask-[\w-]+))},
Regexp, Regexp,
) )
# Match official taps' casks, e.g. `homebrew/cask/somecask` or `homebrew/cask-versions/somecask`. # Match official taps' casks, e.g. `homebrew/cask/somecask`.
HOMEBREW_CASK_TAP_CASK_REGEX = T.let( HOMEBREW_CASK_TAP_CASK_REGEX = T.let(
%r{\A#{HOMEBREW_CASK_TAP_REGEX.source}/#{HOMEBREW_TAP_CASK_TOKEN_REGEX.source}\Z}, %r{\A#{HOMEBREW_CASK_TAP_REGEX.source}/#{HOMEBREW_TAP_CASK_TOKEN_REGEX.source}\Z},
Regexp, Regexp,

View File

@ -335,22 +335,6 @@ RSpec.describe Cask::Audit, :cask do
end end
end end
context "when cask token contains version designation" do
let(:cask_token) { "token-beta" }
it "fails if the cask is from an official tap" do
allow(cask).to receive(:tap).and_return(CoreCaskTap.instance)
expect(run).to error_with(/token contains version designation/)
end
it "does not fail if the cask is from the `cask-versions` tap" do
allow(cask).to receive(:tap).and_return(Tap.fetch("homebrew/cask-versions"))
expect(run).to pass
end
end
context "when cask token contains launcher" do context "when cask token contains launcher" do
let(:cask_token) { "token-launcher" } let(:cask_token) { "token-launcher" }

View File

@ -532,7 +532,7 @@ __fish_brew_complete_arg 'contributions' -l debug -d 'Display any debugging info
__fish_brew_complete_arg 'contributions' -l from -d 'Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year' __fish_brew_complete_arg 'contributions' -l from -d 'Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year'
__fish_brew_complete_arg 'contributions' -l help -d 'Show this message' __fish_brew_complete_arg 'contributions' -l help -d 'Show this message'
__fish_brew_complete_arg 'contributions' -l quiet -d 'Make some output more quiet' __fish_brew_complete_arg 'contributions' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'contributions' -l repositories -d 'Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `aliases`, `bundle`, `command-not-found`, `test-bot`, `services`, `cask-fonts` and `cask-versions`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ' __fish_brew_complete_arg 'contributions' -l repositories -d 'Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `aliases`, `bundle`, `command-not-found`, `test-bot`, `services` and `cask-fonts`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. '
__fish_brew_complete_arg 'contributions' -l to -d 'Date (ISO-8601 format) to stop searching contributions' __fish_brew_complete_arg 'contributions' -l to -d 'Date (ISO-8601 format) to stop searching contributions'
__fish_brew_complete_arg 'contributions' -l user -d 'Specify a comma-separated list of GitHub usernames or email addresses to find contributions from. Omitting this flag searches maintainers' __fish_brew_complete_arg 'contributions' -l user -d 'Specify a comma-separated list of GitHub usernames or email addresses to find contributions from. Omitting this flag searches maintainers'
__fish_brew_complete_arg 'contributions' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'contributions' -l verbose -d 'Make some output more verbose'

View File

@ -684,7 +684,7 @@ _brew_contributions() {
'--from[Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year]' \ '--from[Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year]' \
'--help[Show this message]' \ '--help[Show this message]' \
'--quiet[Make some output more quiet]' \ '--quiet[Make some output more quiet]' \
'--repositories[Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `aliases`, `bundle`, `command-not-found`, `test-bot`, `services`, `cask-fonts` and `cask-versions`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ]' \ '--repositories[Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `aliases`, `bundle`, `command-not-found`, `test-bot`, `services` and `cask-fonts`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ]' \
'--to[Date (ISO-8601 format) to stop searching contributions]' \ '--to[Date (ISO-8601 format) to stop searching contributions]' \
'--user[Specify a comma-separated list of GitHub usernames or email addresses to find contributions from. Omitting this flag searches maintainers]' \ '--user[Specify a comma-separated list of GitHub usernames or email addresses to find contributions from. Omitting this flag searches maintainers]' \
'--verbose[Make some output more verbose]' '--verbose[Make some output more verbose]'

View File

@ -1998,10 +1998,10 @@ Summarise contributions to Homebrew repositories.
: Specify a comma-separated list of repositories to search. Supported : Specify a comma-separated list of repositories to search. Supported
repositories: `brew`, `core`, `cask`, `aliases`, `bundle`, repositories: `brew`, `core`, `cask`, `aliases`, `bundle`,
`command-not-found`, `test-bot`, `services`, `cask-fonts` and `cask-versions`. `command-not-found`, `test-bot`, `services` and `cask-fonts`. Omitting this
Omitting this flag, or specifying `--repositories=primary`, searches only the flag, or specifying `--repositories=primary`, searches only the main
main repositories: brew,core,cask. Specifying `--repositories=all`, searches repositories: brew,core,cask. Specifying `--repositories=all`, searches all
all repositories. repositories.
`--from` `--from`

View File

@ -1265,7 +1265,7 @@ Treat all named arguments as casks\.
Summarise contributions to Homebrew repositories\. Summarise contributions to Homebrew repositories\.
.TP .TP
\fB\-\-repositories\fP \fB\-\-repositories\fP
Specify a comma\-separated list of repositories to search\. Supported repositories: \fBbrew\fP, \fBcore\fP, \fBcask\fP, \fBaliases\fP, \fBbundle\fP, \fBcommand\-not\-found\fP, \fBtest\-bot\fP, \fBservices\fP, \fBcask\-fonts\fP and \fBcask\-versions\fP\&\. Omitting this flag, or specifying \fB\-\-repositories=primary\fP, searches only the main repositories: brew,core,cask\. Specifying \fB\-\-repositories=all\fP, searches all repositories\. Specify a comma\-separated list of repositories to search\. Supported repositories: \fBbrew\fP, \fBcore\fP, \fBcask\fP, \fBaliases\fP, \fBbundle\fP, \fBcommand\-not\-found\fP, \fBtest\-bot\fP, \fBservices\fP and \fBcask\-fonts\fP\&\. Omitting this flag, or specifying \fB\-\-repositories=primary\fP, searches only the main repositories: brew,core,cask\. Specifying \fB\-\-repositories=all\fP, searches all repositories\.
.TP .TP
\fB\-\-from\fP \fB\-\-from\fP
Date (ISO\-8601 format) to start searching contributions\. Omitting this flag searches the last year\. Date (ISO\-8601 format) to start searching contributions\. Omitting this flag searches the last year\.