Sha256: 23044e28e21268428157d88a59e1625f374d69153188f66f5a08d2148633e507

Contents?: true

Size: 1.58 KB

Versions: 2

Compression:

Stored size: 1.58 KB

Contents

require 'reap/manager/svn'

module Reap

  class Manager

    # Generate ChangeLog. This method routes to the 
    # appropriate method for the project's source
    # control manager.
    #
    #

    def scm_log(options={})
      create_txtlog = (options['txtlog'] != false)
      create_xmllog = (options['xmllog'] != false)

      xmlout = options['xmloutput'] || 'doc/log'  # TODO: How to set doc/?

      if create_txtlog
        txtlog = apply_naming_policy('changelog', 'txt')
        txtlog = File.join('log', txtlog)
      end

      if create_xmllog
        xmllog = apply_naming_policy('changelog', 'xml')
        xmllog = File.join(xmlout, xmllog)
      end

      #txtlog = File.join('lib', txtlog) unless txtlog.include?('/')
      #xmllog = File.join(xmldir, xmllog) unless xmllog.include?('/')

      if File.directory?('.svn')
        svn_log('txtlog' => txtlog, 'xmllog' => xmllog)
      else
        abort "Only Subversion is currently supported."
      end
    end

    # Tag current versoin of project. This method routes
    # to the appropriate method for the project's source
    # control manager.

    def scm_tag(*args)
      if File.directory?('.svn')
        svn_tag(*args)
      else
        abort "Only Subversion is currently supported."
      end
    end

    # Branch current version of project. This method routes
    # to the appropriate method for the project's source
    # control manager.

    def scm_branch(*args)
      if File.directory?('.svn')
        svn_branch(*args)
      else
        abort "Only Subversion is currently supported."
      end
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reap-9.2.0 lib/reap/manager/scm.rb
reap-9.2.1 lib/reap/manager/scm.rb