Support HTTPS/SSH cloning
This commit is contained in:
parent
7b0fb50e7f
commit
76d5a1026a
@ -78,12 +78,15 @@ def get_repos_json():
|
||||
exit(1)
|
||||
|
||||
|
||||
def clone_all_apps(repos_json):
|
||||
def clone_all_apps(repos_json, ssh=False):
|
||||
"""Clone all Co-op Cloud apps to ~/.abra/apps."""
|
||||
if not exists(CLONES_PATH):
|
||||
mkdir(CLONES_PATH)
|
||||
|
||||
repos = [[p["name"], p["ssh_url"]] for p in repos_json]
|
||||
if ssh:
|
||||
repos = [[p["name"], p["ssh_url"]] for p in repos_json]
|
||||
else:
|
||||
repos = [[p["name"], p["clone_url"]] for p in repos_json]
|
||||
|
||||
for name, url in repos:
|
||||
if name in REPOS_TO_SKIP:
|
||||
|
@ -10,7 +10,7 @@ from abralib import clone_all_apps, get_repos_json
|
||||
def main():
|
||||
"""Run the script."""
|
||||
repos_json = get_repos_json()
|
||||
clone_all_apps(repos_json)
|
||||
clone_all_apps(repos_json, ssh=True)
|
||||
|
||||
|
||||
main()
|
||||
|
Reference in New Issue
Block a user