Skip to content

Commit b6c4576

Browse files
Add build:<build variant>:clean to cleanup a specific build artifacts
1 parent 2dcdbbe commit b6c4576

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/ruby_wasm/build_system/product/crossruby.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ def build(remake: false, reconfigure: false)
147147
system "tar cfz #{artifact} -C rubies #{name}"
148148
end
149149

150+
def clean
151+
FileUtils.rm_rf dest_dir
152+
FileUtils.rm_rf build_dir
153+
FileUtils.rm_rf ext_build_dir
154+
FileUtils.rm_f artifact
155+
end
156+
150157
def name
151158
@params.name
152159
end

lib/ruby_wasm/rake_task.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ def initialize(
7878
task :reconfigure do
7979
@crossruby.build(reconfigure: true)
8080
end
81+
task :clean do
82+
@crossruby.clean
83+
end
8184
end
8285
end
8386

0 commit comments

Comments
 (0)