[helper] git clone recursively

This commit is contained in:
Oliver Chang 2016-09-02 10:18:00 -07:00
parent 1479b3a76e
commit 960e448f9f
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,7 @@ def _checkout(library_name, checkout_dir):
try:
subprocess.check_call([
'git', 'clone', vcs_url, checkout_dir])
'git', 'clone', '--recursive', vcs_url, checkout_dir])
except subprocess.CalledProcessError:
print('Failed to git clone.', file=sys.stderr)
return False
@ -115,6 +115,10 @@ def _update_checkout(library_name, checkout_dir):
subprocess.check_call(['git', 'checkout', '.'])
subprocess.check_call(['git', 'fetch'])
subprocess.check_call(['git', 'checkout', 'origin/master'])
if os.path.exists(os.path.join(checkout_dir, '.gitmodules')):
subprocess.check_call(['git', 'submodule', 'update', '--recursive'])
except subprocess.CalledProcessError:
print('Failed to update checkout.', file=sys.stderr)
result = False