Sha256: ce60ef8a62797c5ae2f2e3ede65285d6dd46b18a7dccc5599ae2ac3da7cc9b2a

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

require 'reap/systems/rubyforge'

module Reap

  class Manager

    #DEFAULT['rubyforge'] = {
    #  'changelog' => 'CHANGES',
    #  'notelog'   => 'NOTES'
    #}

    # Release packages to rubyforge.

    def rubyforge_release(options)
      options = configure_options(options, 'release', 'rubyforge')

      rubyforge_options = {}
      rubyforge_options[:dryrun]   = dryrun?
      rubyforge_options[:trace]    = trace?
      rubyforge_options[:project]  = options.delete('project')  || metadata.project
      rubyforge_options[:username] = options.delete('username') || ENV['RUBYFORGE_USERNAME']
      rubyforge_options[:group_id] = options.delete('group')

      host = Rubyforge.new(rubyforge_options)

      options['version'] = metadata.version
      options['store']   = 'pkg'

      changelog = options['changelog'] #|| DEFAULT['release']['changelog'] || DEFAULT['rubyforge']['changelog']
      notelog   = options['notelog']   #|| DEFAULT['release']['notelog']   || DEFAULT['rubyforge']['notelog']

      changelog = Dir.glob(changelog.to_s, File::FNM_CASEFOLD).first
      notelog   = Dir.glob(notelog.to_s, File::FNM_CASEFOLD).first

      options['changelog'] = changelog if File.exist?(changelog)
      options['notelog']   = notelog   if File.exist?(notelog)

      host.release(options)
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reap-9.2.0 lib/reap/manager/rubyforge.rb