Sha256: cf7d43b610ee231b0e6501a52100cb19f96e077f5a7276d233131ecc5250d6a4

Contents?: true

Size: 1.72 KB

Versions: 16

Compression:

Stored size: 1.72 KB

Contents

# $Id$

if PROJ.rubyforge.name.valid? && HAVE_RUBYFORGE

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

namespace :gem do
  desc 'Package and upload to RubyForge'
  task :release => [:clobber, 'gem: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.gem._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
    rf.configure
    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.gem.need_tar ? "#{pkg}.tgz" : nil),
             (PROJ.gem.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 if PROJ.rdoc.remote_dir
    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

16 entries across 16 versions & 5 rubygems

Version Path
lijia-rmmseg-cpp-10.2.9.2 tasks/rubyforge.rake
rmmseg-cpp-traditional-2.0.4 tasks/rubyforge.rake
rmmseg-cpp-traditional-2.0.2 tasks/rubyforge.rake
rmmseg-cpp-traditional-2.0.0 tasks/rubyforge.rake
rmmseg-cpp-traditional-1.0.1 tasks/rubyforge.rake
rmmseg-cpp-traditional-1.0.0 tasks/rubyforge.rake
rmmseg-cpp-traditional-0.0.2 tasks/rubyforge.rake
rmmseg-cpp-0.2.9 tasks/rubyforge.rake
ciuchcia-0.0.4 tasks/rubyforge.rake
ciuchcia-0.0.6 tasks/rubyforge.rake
ciuchcia-0.0.7 tasks/rubyforge.rake
ciuchcia-0.0.5 tasks/rubyforge.rake
logging-0.8.0 tasks/rubyforge.rake
rmmseg-cpp-0.2.6 tasks/rubyforge.rake
rmmseg-cpp-0.2.5 tasks/rubyforge.rake
rmmseg-cpp-0.2.7 tasks/rubyforge.rake