Sha256: 80fe6b8653ee7aa786a84bc3d57f15f827f6b7209208db84d1c2f5085827fca9

Contents?: true

Size: 1.67 KB

Versions: 10

Compression:

Stored size: 1.67 KB

Contents

# $Id$

if PROJ.rubyforge_name && HAVE_RUBYFORGE

require 'rubyforge'
require 'rake/contrib/sshpublisher'

namespace :gem do
  desc 'Package and upload to RubyForge'
  task :release => [:clobber, :package] do |t|
    v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
    abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version
    pkg = "pkg/#{PROJ.spec.full_name}"

    if $DEBUG then
      puts "release_id = rf.add_release #{PROJ.rubyforge_name.inspect}, #{PROJ.name.inspect}, #{PROJ.version.inspect}, \"#{pkg}.tgz\""
      puts "rf.add_file #{PROJ.rubyforge_name.inspect}, #{PROJ.name.inspect}, release_id, \"#{pkg}.gem\""
    end

    rf = RubyForge.new
    puts 'Logging in'
    rf.login

    c = rf.userconfig
    c['release_notes'] = PROJ.description if PROJ.description
    c['release_changes'] = PROJ.changes if PROJ.changes
    c['preformatted'] = true

    files = [(PROJ.need_tar ? "#{pkg}.tgz" : nil),
             (PROJ.need_zip ? "#{pkg}.zip" : nil),
             "#{pkg}.gem"].compact

    puts "Releasing #{PROJ.name} v. #{PROJ.version}"
    rf.add_release PROJ.rubyforge_name, PROJ.name, PROJ.version, *files
  end
end  # namespace :gem


namespace :doc do
  desc "Publish RDoc to RubyForge"
  task :release => %w(doc:clobber_rdoc doc:rdoc) do
    config = YAML.load(
        File.read(File.expand_path('~/.rubyforge/user-config.yml'))
    )

    host = "#{config['username']}@rubyforge.org"
    remote_dir = "/var/www/gforge-projects/#{PROJ.rubyforge_name}/"
    remote_dir << PROJ.rdoc_remote_dir || PROJ.name
    local_dir = PROJ.rdoc_dir

    Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
  end
end  # namespace :doc

end  # if HAVE_RUBYFORGE

# EOF

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
bones-1.0.0 data/tasks/rubyforge.rake
bones-1.1.0 data/tasks/rubyforge.rake
bones-1.1.1 data/tasks/rubyforge.rake
bones-1.1.2 data/tasks/rubyforge.rake
bones-1.2.1 data/tasks/rubyforge.rake
bones-1.2.0 data/tasks/rubyforge.rake
csses-1.0.0 tasks/rubyforge.rake
logging-0.6.1 tasks/rubyforge.rake
webby-0.7.0 tasks/rubyforge.rake
webby-0.7.1 tasks/rubyforge.rake