Sha256: 1483e2d6148f850703ab51dbee6af620257edee7011022bb3a70613d1ba76e98

Contents?: true

Size: 745 Bytes

Versions: 1

Compression:

Stored size: 745 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 -u origin #{get_current_branch} -f"
      else
        system "git push -u origin #{get_current_branch}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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