summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-12-27 16:49:32 +0900
committerKOBAYASHI Shuji <[email protected]>2019-12-27 16:49:32 +0900
commit26e6e75ba6a59bc77c80a6ce5d207626cfed91a6 (patch)
treedc77273f9040dfe78a90d7e00108549ef2fd7f08 /Rakefile
parentef6805f599c19634809158da42ad7059ef0a9c5d (diff)
downloadmruby-26e6e75ba6a59bc77c80a6ce5d207626cfed91a6.tar.gz
mruby-26e6e75ba6a59bc77c80a6ce5d207626cfed91a6.zip
Use Rake DSL instead of commands of `FileUtils`
- Respect `--verbose(-v)` and `--dry-run(-n)` options. - Silence warnings to keyword arguments on Ruby 2.7.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile13
1 files changed, 6 insertions, 7 deletions
diff --git a/Rakefile b/Rakefile
index 69c7d4c89..dfef9cc55 100644
--- a/Rakefile
+++ b/Rakefile
@@ -33,10 +33,9 @@ load "#{MRUBY_ROOT}/tasks/gitlab.rake"
load "#{MRUBY_ROOT}/tasks/doc.rake"
def install_D(src, dst)
- opts = { :verbose => $verbose }
- FileUtils.rm_f dst, opts
- FileUtils.mkdir_p File.dirname(dst), opts
- FileUtils.cp src, dst, opts
+ rm_f dst
+ mkdir_p File.dirname(dst)
+ cp src, dst
end
##############################
@@ -144,16 +143,16 @@ end
desc "clean all built and in-repo installed artifacts"
task :clean do
MRuby.each_target do |t|
- FileUtils.rm_rf t.build_dir, { :verbose => $verbose }
+ rm_rf t.build_dir
end
- FileUtils.rm_f depfiles, { :verbose => $verbose }
+ rm_f depfiles
puts "Cleaned up target build folder"
end
desc "clean everything!"
task :deep_clean => ["clean", "clean_doc"] do
MRuby.each_target do |t|
- FileUtils.rm_rf t.gem_clone_dir, { :verbose => $verbose }
+ rm_rf t.gem_clone_dir
end
puts "Cleaned up mrbgems build folder"
end