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

Version Path
kite-1.2.3 tpl/skel/lib/tasks/git.rake
kite-1.2.2 tpl/skel/lib/tasks/git.rake
kite-1.2.1 tpl/skel/lib/tasks/git.rake
kite-1.2.0 tpl/skel/lib/tasks/git.rake
kite-1.1.17 tpl/skel/lib/tasks/git.rake
kite-1.1.16 tpl/skel/lib/tasks/git.rake
kite-1.1.15 tpl/skel/lib/tasks/git.rake
kite-1.1.14 tpl/skel/lib/tasks/git.rake
kite-1.1.13 tpl/skel/lib/tasks/git.rake
kite-1.1.12 tpl/skel/lib/tasks/git.rake
kite-1.1.11 tpl/skel/lib/tasks/git.rake
kite-1.1.10 tpl/skel/lib/tasks/git.rake
kite-1.1.9 tpl/skel/lib/tasks/git.rake
kite-1.1.8 tpl/skel/lib/tasks/git.rake
kite-1.1.7 tpl/skel/lib/tasks/git.rake
kite-1.1.3 tpl/skel/lib/tasks/git.rake
kite-1.1.1 tpl/skel/lib/tasks/git.rake
kite-1.0.10 tpl/skel/lib/tasks/git.rake