disable scratch build if release branch
This commit is contained in:
parent
ff259a1ae1
commit
3e7399e820
1 changed files with 7 additions and 2 deletions
|
@ -27,7 +27,8 @@ class KojiProcessor:
|
|||
def __init__(self):
|
||||
pass
|
||||
|
||||
def koji_build_shell(self, build_target: str, git_url: str, scratch: bool = True, nowait: bool = True) -> str:
|
||||
def koji_build_shell(self, build_target: str, git_url: str,
|
||||
scratch: bool = True, nowait: bool = True) -> str:
|
||||
result = {"out": "", "err": ""}
|
||||
|
||||
# Construct the koji build command
|
||||
|
@ -124,8 +125,12 @@ class ForgejoWebhookProcessor:
|
|||
|
||||
git_url = f"git+{clone_url}#{commit_id}"
|
||||
|
||||
scratch = True
|
||||
if 'release' in ref.lower():
|
||||
scratch = False
|
||||
|
||||
if app.config.get('KOJI_USE_SHELL'):
|
||||
result = KojiProcessor().koji_build_shell(app.config['KOJI_TARGET'], git_url)
|
||||
result = KojiProcessor().koji_build_shell(app.config['KOJI_TARGET'], git_url, scratch=scratch)
|
||||
else:
|
||||
result = KojiProcessor().koji_build(app.config['KOJI_SERVER'], app.config['KOJI_TARGET'], git_url)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue