Submodule init/update for old git.
This commit is contained in:
parent
e60321b0d8
commit
6c507f118d
|
@ -1 +1 @@
|
||||||
Subproject commit 145b1c6ca6aa84718a076acae2a9ea8f4f94f42d
|
Subproject commit 9b829e85822c21a9ff0a3d0f9c31a68daf7cfd3f
|
44
xenia-build
44
xenia-build
|
@ -178,6 +178,34 @@ def shell_call(command, throw_on_error=True, stdout_path=None):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def git_submodule_update():
|
||||||
|
"""Runs a full recursive git submodule init and update.
|
||||||
|
|
||||||
|
Older versions of git do not support 'update --init --recursive'. We could
|
||||||
|
check and run it on versions that do support it and speed things up a bit.
|
||||||
|
"""
|
||||||
|
shell_call([
|
||||||
|
'git',
|
||||||
|
'submodule',
|
||||||
|
'init',
|
||||||
|
])
|
||||||
|
shell_call([
|
||||||
|
'git',
|
||||||
|
'submodule',
|
||||||
|
'foreach',
|
||||||
|
'--recursive',
|
||||||
|
'git',
|
||||||
|
'submodule',
|
||||||
|
'init',
|
||||||
|
])
|
||||||
|
shell_call([
|
||||||
|
'git',
|
||||||
|
'submodule',
|
||||||
|
'update',
|
||||||
|
'--recursive',
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
def run_premake(target_os, action):
|
def run_premake(target_os, action):
|
||||||
"""Runs premake on the main project with the given format.
|
"""Runs premake on the main project with the given format.
|
||||||
|
|
||||||
|
@ -318,13 +346,7 @@ class SetupCommand(Command):
|
||||||
|
|
||||||
# Setup submodules.
|
# Setup submodules.
|
||||||
print('- git submodule init / update...')
|
print('- git submodule init / update...')
|
||||||
shell_call([
|
git_submodule_update()
|
||||||
'git',
|
|
||||||
'submodule',
|
|
||||||
'update',
|
|
||||||
'--init',
|
|
||||||
'--recursive',
|
|
||||||
])
|
|
||||||
print('')
|
print('')
|
||||||
|
|
||||||
print('- running premake...')
|
print('- running premake...')
|
||||||
|
@ -374,13 +396,7 @@ class PullCommand(Command):
|
||||||
print('')
|
print('')
|
||||||
|
|
||||||
print('- pulling dependencies...')
|
print('- pulling dependencies...')
|
||||||
shell_call([
|
git_submodule_update()
|
||||||
'git',
|
|
||||||
'submodule',
|
|
||||||
'update',
|
|
||||||
'--init',
|
|
||||||
'--recursive',
|
|
||||||
])
|
|
||||||
print('')
|
print('')
|
||||||
|
|
||||||
print('- running premake...')
|
print('- running premake...')
|
||||||
|
|
Loading…
Reference in New Issue