mirror of
https://github.com/openSUSE/osc.git
synced 2025-11-08 23:23:16 +01:00
Merge pull request #1760 from dmach/osc-build-project-from-_ObsPrj
Extend 'osc build' and 'osc fork' to use project.build file from Gitea, 'osc fork' also follows the devel project now
This commit is contained in:
@@ -44,6 +44,8 @@ class Repo:
|
||||
owner: str,
|
||||
repo: str,
|
||||
*,
|
||||
branch: Optional[str] = None,
|
||||
quiet: bool = False,
|
||||
directory: Optional[str] = None,
|
||||
cwd: Optional[str] = None,
|
||||
anonymous: bool = False,
|
||||
@@ -112,6 +114,13 @@ class Repo:
|
||||
|
||||
# clone
|
||||
cmd = ["git", "clone", clone_url, directory]
|
||||
|
||||
if branch:
|
||||
cmd += ["--branch", branch]
|
||||
|
||||
if quiet:
|
||||
cmd += ["--quiet"]
|
||||
|
||||
subprocess.run(cmd, cwd=cwd, env=env, check=True)
|
||||
|
||||
# setup remotes
|
||||
|
||||
Reference in New Issue
Block a user