Rakefile in backlog-0.17.1 vs Rakefile in backlog-0.17.2

- old
+ new

@@ -1,8 +1,10 @@ # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. +require 'erb' + require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' @@ -28,11 +30,11 @@ :executables => ['backlog'], :requirements => ['ImageMagick', 'PostgreSQL'] } p.need_zip = true p.url = 'http://rubyforge.org/projects/backlog/' - p.extra_deps = [['rails', '>= 1.2.3'], ['gruff', '>= 0.2.8'], ['rmagick', '>= 1.15.10'], ['postgres', '>= 0.7.1']] + p.extra_deps = [['rails', '>= 1.2.4'], ['gruff', '>= 0.2.9'], ['rmagick', '>= 1.15.12'], ['postgres', '>= 0.7.9']] p.rsync_args = "-av --delete --exclude=wiki*" end desc 'Release the application to RubyForge' task :release_all do @@ -43,11 +45,16 @@ Rake::Task[:post_news].invoke end desc 'Release the application as a Java EE WAR file to RubyForge' task :release_war do + FileUtils.rm_rf 'WEB-INF' if File.exists? 'WEB-INF' Dir.mkdir 'WEB-INF' unless File.exists? 'WEB-INF' - FileUtils.cp 'vendor/plugins/goldspike/generators/goldspike/templates/web.xml.erb', 'WEB-INF/web.xml.erb' unless File.exists? 'WEB-INF/web.xml.erb' + unless File.exists? 'WEB-INF/web.xml.erb' + File.open('WEB-INF/web.xml.erb', 'w') do |f| + f << ERB.new(File.read('vendor/plugins/goldspike/generators/goldspike/templates/web.xml.erb')).result + end + end Rake::Task['war:standalone:create'].invoke war_pkg_file = "pkg/backlog-#{APP::VERSION}.war" if File.exists? 'backlog.war' FileUtils.makedirs 'pkg' FileUtils.move 'backlog.war', war_pkg_file