Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow third-party taps to include both casks and formulae. #177890

Closed
Closed
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
7 changes: 0 additions & 7 deletions cmd/lib/changed_files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,10 @@ def changed_files
"git", args: ["diff", "--name-only", "--diff-filter=A", commit_range], chdir: path
).stdout.split("\n").map { |path| Pathname(path) }

modified_ruby_files = modified_files.select { |path| path.extname == ".rb" }
modified_command_files = modified_files.select { |path| path.ascend.to_a.last.to_s == "cmd" }
modified_github_actions_files = modified_files.select { |path| path.to_s.start_with?(".github/actions/") }
modified_cask_files = modified_files.select { |path| cask_file?(path) }

{
modified_files:,
added_files:,
modified_ruby_files:,
modified_command_files:,
modified_github_actions_files:,
modified_cask_files:,
}
end
Expand Down
15 changes: 0 additions & 15 deletions cmd/lib/ci_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,6 @@ def self.generate(tap, labels: [], cask_names: [], skip_install: false, new_cask

changed_files = tap.changed_files

ruby_files_in_wrong_directory =
changed_files[:modified_ruby_files] - (
changed_files[:modified_cask_files] +
changed_files[:modified_command_files] +
changed_files[:modified_github_actions_files]
)

if ruby_files_in_wrong_directory.any?
ruby_files_in_wrong_directory.each do |path|
puts "::error file=#{path}::File is in wrong directory."
end

odie "Found Ruby files in wrong directory:\n#{ruby_files_in_wrong_directory.join("\n")}"
end

cask_files_to_check = if cask_names.any?
cask_names.map do |cask_name|
Cask::CaskLoader.find_cask_in_tap(cask_name, tap).relative_path_from(tap.path)
Expand Down
Loading