module Hoe::Publish

def define_publish_tasks

def define_publish_tasks
  if need_rdoc then
    task :isolate # ensure it exists
    desc "Generate rdoc"
    task :docs => [:clobber_docs, :isolate] do
      sh(*make_rdoc_cmd)
    end
    desc "Generate rdoc coverage report"
    task :dcov => :isolate do
      sh(*make_rdoc_cmd("-C"))
    end
    desc "Remove RDoc files"
    task :clobber_docs do
      rm_rf local_rdoc_dir
    end
    task :clobber => :clobber_docs
    desc "Generate ri locally for testing."
    task :ridocs => [:clean, :isolate] do
      sh(*make_rdoc_cmd("--ri", "-o", "ri"))
    end
  end
  desc "Publish RDoc to wherever you want."
  task :publish_docs => [:clean, :docs] do
    publish_docs_task
  end
  # no doco for this one
  task :publish_on_announce do
    publish_on_announce_task
  end
  desc "Generate email announcement file."
  task :debug_email do
    puts generate_email ENV["FULL"]
  end
  desc 'Post announcement to blog. Uses the "blogs" array in your hoerc.'
  task :post_blog do
    post_blog_task
  end
  desc "Announce your release."
  task :announce => [:post_blog, :publish_on_announce ]
end