Merge pull request #18789 from bevanjkay/generate-cask-ci-matrix-syntax
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Docker / docker (Ubuntu ${{ matrix.version }}) (18.04) (push) Waiting to run
Docker / docker (Ubuntu ${{ matrix.version }}) (20.04) (push) Waiting to run
Docker / docker (Ubuntu ${{ matrix.version }}) (22.04) (push) Waiting to run
Docker / docker (Ubuntu ${{ matrix.version }}) (24.04) (push) Waiting to run
Documentation CI / docs (push) Waiting to run
Ruby Documentation CI / rubydoc (push) Waiting to run
Update sponsors, maintainers, manpage and completions / updates (push) Waiting to run
CI / syntax (push) Waiting to run
CI / tap syntax (push) Blocked by required conditions
CI / formula audit (push) Blocked by required conditions
CI / cask audit (push) Blocked by required conditions
CI / vendored gems (push) Blocked by required conditions
CI / ${{ matrix.name }} (update-test (Ubuntu), ubuntu-latest) (push) Blocked by required conditions
CI / ${{ matrix.name }} (update-test (macOS), macos-15) (push) Blocked by required conditions
CI / ${{ matrix.name }} (tests (Ubuntu 20.04), ubuntu-20.04, --coverage) (push) Blocked by required conditions
CI / ${{ matrix.name }} (tests (Ubuntu 22.04), ubuntu-22.04, --coverage) (push) Blocked by required conditions
CI / ${{ matrix.name }} (tests (Ubuntu 24.04), ubuntu-24.04, --coverage) (push) Blocked by required conditions
CI / ${{ matrix.name }} (tests (generic OS), ubuntu-latest, --generic --coverage) (push) Blocked by required conditions
CI / ${{ matrix.name }} (tests (macOS 13 x86_64), macos-13, --coverage) (push) Blocked by required conditions
CI / ${{ matrix.name }} (tests (macOS 15 arm64), macos-15, --coverage) (push) Blocked by required conditions
CI / ${{ matrix.name }} (tests (online), ubuntu-latest, --online --coverage) (push) Blocked by required conditions
CI / ${{ matrix.name }} (ghcr.io/homebrew/ubuntu20.04, test default formula (Ubuntu 20.04), ubuntu-latest) (push) Blocked by required conditions
CI / ${{ matrix.name }} (ghcr.io/homebrew/ubuntu22.04:master, test default formula (Ubuntu 22.04), ubuntu-latest) (push) Blocked by required conditions
CI / ${{ matrix.name }} (test default formula (macOS 13 x86_64), macos-13) (push) Blocked by required conditions
CI / ${{ matrix.name }} (test default formula (macOS 15 arm64), macos-15) (push) Blocked by required conditions

generate-cask-ci-matrix-syntax: allow no argument for syntax-only jobs
This commit is contained in:
Mike McQuaid 2024-11-19 12:04:11 +00:00 committed by GitHub
commit c81cd0b929
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,7 @@ module Homebrew
conflicts "--syntax-only", "--skip-install"
conflicts "--syntax-only", "--new"
named_args [:cask, :url], min: 1
named_args [:cask, :url], min: 0
hide_from_man_page!
end
@ -61,7 +61,10 @@ module Homebrew
tap = T.let(Tap.fetch(repository), Tap)
raise UsageError, "Either `--cask` or `--url` must be specified." if casks.blank? && pr_url.blank?
unless syntax_only
raise UsageError, "Either `--cask` or `--url` must be specified." if !args.casks? && !args.url?
raise UsageError, "Please provide a cask or url argument" if casks.blank? && pr_url.blank?
end
raise UsageError, "Only one url can be specified" if pr_url&.count&.> 1
labels = if pr_url