Skip to content

Commit

Permalink
Remove Ruby file check.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Jun 27, 2024
1 parent 1fd0b13 commit 8781490
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
9 changes: 0 additions & 9 deletions cmd/lib/changed_files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,11 @@ 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_formula_files = modified_files.select { |path| formula_file?(path) }

{
modified_files:,
added_files:,
modified_ruby_files:,
modified_command_files:,
modified_github_actions_files:,
modified_cask_files:,
modified_formula_files:,
}
end
end
17 changes: 0 additions & 17 deletions cmd/lib/ci_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +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] +
# Allow third-party taps to include both formulae/casks.
(tap.official? ? changed_files[:modified_formula_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

0 comments on commit 8781490

Please sign in to comment.