Sha256: 4460a4164338201ff0c677b30d3ff8e0594d4f8fbd0c02ee9cf199ebec96dd9e

Contents?: true

Size: 1.85 KB

Versions: 5

Compression:

Stored size: 1.85 KB

Contents

#!/usr/bin/env ruby
require 'thor'
require 'rgitflow'

module RGitFlowCLI
  class Feature < Thor
    include ::RGitFlow::Console

    desc 'start <name>', 'starts a feature branch named <name>'
    def start(name)
      run 'bundle', 'exec', 'rake', 'rgitflow:feature:start', "BRANCH=#{name}"
    end

    desc 'finish', 'finishes a feature branch'
    def finish(name)
      run 'bundle', 'exec', 'rake', 'rgitflow:feature:finish', "BRANCH=#{name}"
    end
  end

  class Release < Thor
    include ::RGitFlow::Console

    desc 'start', %Q(starts a release branch named
                    #{RGitFlow::Config.options[:release]}/#{RGitFlow::VERSION.to_s})
    def start(name)
      run 'bundle', 'exec', 'rake', 'rgitflow:release:start', "BRANCH=#{name}"
    end

    desc 'finish', 'finishes a release branch'
    def finish(name)
      run 'bundle', 'exec', 'rake', 'rgitflow:release:finish', "BRANCH=#{name}"
    end
  end

  class Hotfix < Thor
    include ::RGitFlow::Console

    desc 'start <name>', 'starts a hotfix branch named <name>'
    def start(name)
      run 'bundle', 'exec', 'rake', 'rgitflow:hotfix:start', "BRANCH=#{name}"
    end

    desc 'finish', 'finishes a hotfix branch'
    def finish(name)
      run 'bundle', 'exec', 'rake', 'rgitflow:hotfix:finish', "BRANCH=#{name}"
    end
  end

  class RGitFlow < Thor
    include ::RGitFlow::Console

    desc 'status', 'prints out information about which files have changed'
    def status
      run 'bundle', 'exec', 'rake', 'rgitflow:scm:status'
    end

    desc 'feature SUBCOMMAND ...ARGS', 'start or finish a feature branch'
    subcommand 'feature', Feature

    desc 'release SUBCOMMAND ...ARGS', 'start or finish a release branch'
    subcommand 'release', Release

    desc 'hotfix SUBCOMMAND ...ARGS', 'start or finish a hotfix branch'
    subcommand 'hotfix', Hotfix
  end
end

RGitFlowCLI::RGitFlow.start ARGV

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rgitflow-0.2.1.pre.alpha.pre.28 exe/rgitflow
rgitflow-0.2.0.pre.alpha.pre.27 exe/rgitflow
rgitflow-0.2.0.pre.alpha.pre.26 exe/rgitflow
rgitflow-0.2.0.pre.alpha.pre.25 exe/rgitflow
rgitflow-0.2.0 exe/rgitflow