Created
July 8, 2014 17:39
-
-
Save frodopwns/a6125c2d1d2f2ec5ebf8 to your computer and use it in GitHub Desktop.
Deploy repos with nested submodules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import * | |
def deep_snd(path_to_repo): | |
if path_to_repo[0] != '/': | |
path_to_repo = local("readlink -f {}".format(path_to_repo), capture=True) | |
dirs = local("find {} -name .gitmodules".format(path_to_repo), capture=True) | |
dirs = [x.rstrip(".gitmodules") for x in dirs.split()] | |
with lcd(path_to_repo): | |
local("git pull") | |
for d in dirs: | |
with lcd(d): | |
local("git submodule init") | |
local("git submodule update") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment