Skip to content

Commit

Permalink
Added gem build task, gemspec cleans first
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Yurek committed May 10, 2009
1 parent 037db68 commit f47a4b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ task :clean do |t|
FileUtils.rm_rf "pkg"
FileUtils.rm "test/debug.log" rescue nil
FileUtils.rm "test/paperclip.db" rescue nil
Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
end

spec = Gem::Specification.new do |s|
Expand Down Expand Up @@ -69,8 +70,13 @@ spec = Gem::Specification.new do |s|
end

desc "Generate a gemspec file for GitHub"
task :gemspec do
task :gemspec => :clean do
File.open("#{spec.name}.gemspec", 'w') do |f|
f.write spec.to_ruby
end
end

desc "Build the gem into the current directory"
task :gem => :gemspec do
`gem build #{spec.name}.gemspec`
end

0 comments on commit f47a4b5

Please sign in to comment.