Skip to content

Commit 1a857da

Browse files
committed
chore: Delete RBS files along with Ruby files
1 parent 1208cac commit 1a857da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Rakefile

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ RuboCop::RakeTask.new
1212
desc "Generate rbs files"
1313
task :rbs_inline do
1414
sh "rbs-inline --output --opt-out lib"
15+
16+
# If the Ruby file is deleted, delete the RBS file
17+
Dir.glob("sig/generated/**/*.rbs").each do |path|
18+
rbs_path = Pathname(path)
19+
rb_path = rbs_path.sub(%r{^sig/generated}, "lib").sub_ext(".rb")
20+
rbs_path.delete unless File.exist?(rb_path)
21+
end
1522
end
1623

1724
desc "Run Steep"

0 commit comments

Comments
 (0)