Sha256: bab655abb6433c42213389cbce91bd8cad680dc28bcc2c20926f028b2bef210c

Contents?: true

Size: 739 Bytes

Versions: 1

Compression:

Stored size: 739 Bytes

Contents

require 'colorize'
require_relative '../util/submodule'

module GGSM
  module Finish
    include Submodule

    def finish_flow(force)
      check_submodule

      foreach_module {
        process_finish(false)
      }

      puts '==> 进入主工程:'.yellow
      process_finish(force)

      puts 'Modules执行:git add & commit & push'.blue
    end

    def process_finish(force)
      system 'git add .'

      branch = get_current_branch
      if branch.include?('rebas')
        system 'git rebase --continue'
      else
        system 'git commit'
      end

      if force
        system "git push origin #{get_current_branch} -f"
      else
        system "git push origin #{get_current_branch}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ggsm-1.7.0 lib/ggsm/command/finish.rb