Skip to content

Commit

Permalink
add rake clean task
Browse files Browse the repository at this point in the history
  • Loading branch information
tobijk committed Feb 7, 2011
1 parent 013f7a6 commit 3acd329
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Rakefile
@@ -1,3 +1,5 @@
require 'fileutils'

desc "show available rake tasks"
task :default do |t|
puts "The following rake tasks are available\n"
Expand All @@ -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"
Expand Down

0 comments on commit 3acd329

Please sign in to comment.