Permalink
Browse files

add rake clean task

  • Loading branch information...
tobijk committed Feb 7, 2011
1 parent 013f7a6 commit 3acd329ae69ca0af55d4c52f0a2fc358a09d439e
Showing with 16 additions and 0 deletions.
  1. +16 −0 Rakefile
View
@@ -1,3 +1,5 @@
+require 'fileutils'
+
desc "show available rake tasks"
task :default do |t|
puts "The following rake tasks are available\n"
@@ -14,6 +16,20 @@ task :build do |t|
end
+desc "clean source tree"
+task :clean do |t|
+ Dir.chdir "ext/libarchive-ruby-swig/" do
+ sh "make distclean" if File.exist? 'libarchive_wrap.cxx'
+ end
+
+ [ 'doc', '*.gem' ].each do |glob|
+ filelist = Dir.glob(glob)
+ filelist.each do |entry|
+ FileUtils.remove_entry_secure(entry)
+ end
+ end
+end
+
desc "generate a gem bundle"
task :gem do |t|
sh "gem build libarchive-ruby-swig.gemspec"

0 comments on commit 3acd329

Please sign in to comment.