Compare commits

...
Author SHA1 Message Date
dboreham b94cfb4de8 Merge pull request #51 from cerc-io/dboreham/use-git-http
Allow http for git (as the default)
2022-11-15 22:19:25 -07:00
dboreham ed4352911d Allow http for git (as the default) 2022-11-15 22:18:43 -07:00
dboreham e5c18ba77a Update README.md
Update download url version.
2022-11-15 22:06:04 -07:00
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ Ensure that the following are already installed:
1. Download the latest release from [this page](https://github.com/cerc-io/stack-orchestrator/tags), into a suitable directory (e.g. `~/bin`): 1. Download the latest release from [this page](https://github.com/cerc-io/stack-orchestrator/tags), into a suitable directory (e.g. `~/bin`):
``` ```
$ cd ~/bin $ cd ~/bin
$ curl https://github.com/cerc-io/stack-orchestrator/releases/download/v1.0.1-alpha/laconic-so $ curl https://github.com/cerc-io/stack-orchestrator/releases/download/v1.0.2-alpha/laconic-so
``` ```
1. Ensure `laconic-so` is on the `PATH` 1. Ensure `laconic-so` is on the `PATH`
1. Verify operation: 1. Verify operation:
+5 -2
View File
@@ -53,11 +53,12 @@ def is_git_repo(path):
@click.command() @click.command()
@click.option("--include", help="only clone these repositories") @click.option("--include", help="only clone these repositories")
@click.option("--exclude", help="don\'t clone these repositories") @click.option("--exclude", help="don\'t clone these repositories")
@click.option('--git-ssh', is_flag=True, default=False)
@click.option('--check-only', is_flag=True, default=False) @click.option('--check-only', is_flag=True, default=False)
@click.option('--pull', is_flag=True, default=False) @click.option('--pull', is_flag=True, default=False)
@click.option('--branches-file', help="checkout branches specified in this file") @click.option('--branches-file', help="checkout branches specified in this file")
@click.pass_context @click.pass_context
def command(ctx, include, exclude, check_only, pull, branches_file): def command(ctx, include, exclude, git_ssh, check_only, pull, branches_file):
'''git clone the set of repositories required to build the complete system from source''' '''git clone the set of repositories required to build the complete system from source'''
quiet = ctx.obj.quiet quiet = ctx.obj.quiet
@@ -105,7 +106,9 @@ def command(ctx, include, exclude, check_only, pull, branches_file):
print(f"Excluding: {repo}") print(f"Excluding: {repo}")
def process_repo(repo): def process_repo(repo):
full_github_repo_path = f"git@github.com:{repo}" git_ssh_prefix = "git@github.com:"
git_http_prefix = "https://github.com/"
full_github_repo_path = f"{git_ssh_prefix if git_ssh else git_http_prefix}{repo}"
repoName = repo.split("/")[-1] repoName = repo.split("/")[-1]
full_filesystem_repo_path = os.path.join(dev_root_path, repoName) full_filesystem_repo_path = os.path.join(dev_root_path, repoName)
is_present = os.path.isdir(full_filesystem_repo_path) is_present = os.path.isdir(full_filesystem_repo_path)