Sha256: 3662027591a1b44bddc12c8fee26682c17a9d27e7bc8fc2544991d32b8f04fcc
Contents?: true
Size: 684 Bytes
Versions: 27
Compression:
Stored size: 684 Bytes
Contents
require 'colorize' require_relative '../util/submodule' require_relative '../util/stash' module GGSM module Foreach include Submodule include Stash def foreach_flow(*commands) check_submodule cmd = '' if commands.size == 0 puts '请输入正确git命令 foreach [<commands>...]'.red return elsif commands.fetch(0) == 'git' commands.delete_at(0) end commands.each do |arg| cmd = "#{cmd} #{arg}" end foreach_module { system "git #{cmd}" } puts '==> *进入主工程:'.yellow system "git #{cmd}" puts "Modules执行:git#{cmd}".blue end end end
Version data entries
27 entries across 27 versions & 1 rubygems