Add support for `ci-skip-appcast` label.
This commit is contained in:
parent
e9bb319ad6
commit
084b424e02
|
@ -3,7 +3,7 @@ require_relative "changed_files"
|
|||
module CiMatrix
|
||||
MAX_JOBS = 256
|
||||
|
||||
def self.generate(tap)
|
||||
def self.generate(tap, labels: [])
|
||||
odie "This command must be run from inside a tap directory." unless tap
|
||||
|
||||
changed_files = ChangedFiles.collect(tap)
|
||||
|
@ -27,7 +27,13 @@ module CiMatrix
|
|||
changed_files[:modified_cask_files].map do |path|
|
||||
cask = Cask::CaskLoader.load(path)
|
||||
|
||||
audit_args = ["--download", "--appcast", "--online"]
|
||||
appcast_arg = if labels.include?("ci-skip-appcast")
|
||||
"--no-appcast"
|
||||
else
|
||||
"--appcast"
|
||||
end
|
||||
|
||||
audit_args = ["--download", appcast_arg, "--online"]
|
||||
|
||||
if changed_files[:added_files].include?(path)
|
||||
audit_args << "--new-cask"
|
||||
|
@ -40,6 +46,7 @@ module CiMatrix
|
|||
path: "./#{path}",
|
||||
},
|
||||
audit_args: audit_args,
|
||||
skip_install: labels.include?("ci-skip-install"),
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,13 +18,7 @@ syntax_job = {
|
|||
matrix = [syntax_job]
|
||||
|
||||
unless labels.include?("ci-syntax-only")
|
||||
cask_matrix = CiMatrix.generate(tap)
|
||||
|
||||
cask_matrix.each do |job|
|
||||
job[:skip_install] = labels.include?("ci-skip-install")
|
||||
end
|
||||
|
||||
matrix += cask_matrix
|
||||
matrix += CiMatrix.generate(tap, labels: labels)
|
||||
end
|
||||
|
||||
puts JSON.pretty_generate(matrix)
|
||||
|
|
Loading…
Reference in New Issue