# 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' require 'tasks/rails' require 'hoe' require 'version_from_history' Hoe.new("backlog", APP::VERSION) do |p| p.rubyforge_name = "backlog" p.summary = "Application to aid collecting, processing, organizing, reviewing and doing tasks." p.description = p.paragraphs_of('README.txt', 2..3).join("\n\n") p.author = 'Uwe Kubosch' p.email = 'uwe@kubosch.no' p.remote_rdoc_dir = '' # Release to root p.changes = File.read('History.txt').scan(/^== .*?(?=^== )/m).first p.rdoc_pattern = /^(app\/(controllers|helpers|models)|lib|bin)|txt$/ p.clean_globs = ['doc', 'log/*'] p.spec_extras = { :files => Dir['**/*'].reject{|file_name| file_name =~ /^(doc|log|pkg|tmp|WEB-INF)/}, :rdoc_options => ['--inline-source'], :executables => ['backlog'], :requirements => ['ImageMagick', 'PostgreSQL'] } p.need_zip = true p.url = 'http://rubyforge.org/projects/backlog/' p.extra_deps = [['rails', '= 1.2.4'], ['gruff', '~> 0.2.9'], ['postgres', '~> 0.7.9'], ['slave', '~> 1.2.1']] # ['rmagick', '~> 1.15.12'], p.rsync_args = "-acv --delete --exclude=wiki*" end desc 'Release the application to RubyForge' task :release_all do ENV['VERSION'] = APP::VERSION Rake::Task[:publish_docs].invoke Rake::Task[:release].invoke Rake::Task[:release_war].invoke Rake::Task[:post_news].invoke end # Remember to set @send_timeout in /usr/lib/ruby/gems/1.8/gems/rubyforge-0.4.4/lib/http-access2.rb # @send_timeout = 3600 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' 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 end if File.exists? war_pkg_file rf = RubyForge.new rf.login rf.add_file 'backlog', 'backlog', APP::VERSION, war_pkg_file end end