diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/getfs.py | 1 | ||||
-rw-r--r-- | src/backend/setbranch.py | 8 | ||||
-rwxr-xr-x | src/frontend/cli/sisyphus-cli.py | 7 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/backend/getfs.py b/src/backend/getfs.py index 5186db4..72b058b 100644 --- a/src/backend/getfs.py +++ b/src/backend/getfs.py @@ -2,6 +2,7 @@ import platform +remoteGithub = 'https://github.com/redcorelinux' remoteGitlab = 'https://gitlab.com/redcore' remotePagure = 'https://pagure.io/redcore' diff --git a/src/backend/setbranch.py b/src/backend/setbranch.py index 0527ad4..0b013a3 100644 --- a/src/backend/setbranch.py +++ b/src/backend/setbranch.py @@ -17,12 +17,16 @@ def getBranchRemote(branch, remote): redcoreRemote = [] portageConfigRemote = [] if "master" in branch: - if "gitlab" in remote: + if "github" in remote: + remote = sisyphus.getfs.remoteGithub + elif "gitlab" in remote: remote = sisyphus.getfs.remoteGitlab elif "pagure" in remote: remote = sisyphus.getfs.remotePagure elif "next" in branch: - if "gitlab" in remote: + if github in remote: + remote = sisyphus.getfs.remoteGithub + elif "gitlab" in remote: remote = sisyphus.getfs.remoteGitlab elif "pagure" in remote: remote = sisyphus.getfs.remotePagure diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py index 4a514c8..93963dd 100755 --- a/src/frontend/cli/sisyphus-cli.py +++ b/src/frontend/cli/sisyphus-cli.py @@ -229,20 +229,23 @@ class Branch(str, Enum): next = 'next' class Remote(str, Enum): + github = 'github' gitlab = 'gitlab' pagure = 'pagure' @app.command("branch") -def branch(branch: Branch = typer.Argument(...), remote: Remote = typer.Option(Remote.pagure, "--remote", "-r")): +def branch(branch: Branch = typer.Argument(...), remote: Remote = typer.Option(Remote.gitlab, "--remote", "-r")): """Pull the selected branch of the Portage tree, Redcore overlay and Portage configs. The remote can be selected by using the --remote option. 'BRANCH' can be one of the following : master, next - 'REMOTE' can be one of the following : gitlab, pagure (default is pagure) + 'REMOTE' can be one of the following : github, gitlab, pagure (default is gitlab) * Examples: + branch next --remote=github # pull the branch 'next' from github.com + branch master --remote=gitlab # pull the branch 'master' from gitlab.com branch next --remote=pagure # pull the branch 'next' from pagure.io |