Sha256: 44632bac600dc46d73bd49bb72b89957dd04c6617dca48cb8f1a89cce6d7bc98
Contents?: true
Size: 493 Bytes
Versions: 18
Compression:
Stored size: 493 Bytes
Contents
def for_each_submodule &block status = %x{git submodule status} status.each {|line| yield line.split()[1] } end def for_each_submodule_dir &block for_each_submodule { |dir| Dir.chdir(dir) { yield dir } } end def get_branch(status = `git status`) branch = nil if match = Regexp.new("^# On branch (.*)").match(status) branch = match[1] end end namespace :git do desc "Update submodules" task :update do %x{git submodule init} %x{git submodule update} end end
Version data entries
18 entries across 18 versions & 1 rubygems