Skip to content

Commit d13784d

Browse files
committed
Conditionalise Copr target used for building
Use the .dev suffixed target only for centos stream contributions.
1 parent 91db33e commit d13784d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mcp_server/copr_tools.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from fastmcp.exceptions import ToolError
1414
from pydantic import BaseModel, Field
1515

16-
from common.utils import init_kerberos_ticket, KerberosError
16+
from common.utils import init_kerberos_ticket, KerberosError, is_cs_branch
1717
from common.validators import AbsolutePath
1818

1919
COPR_CONFIG = {
@@ -61,7 +61,9 @@ def _branch_to_chroot(dist_git_branch: str) -> str:
6161
if not m:
6262
raise ValueError(f"Unsupported branch name: {dist_git_branch}")
6363
majorver = next(g for g in m.groups() if g is not None)
64-
return f"rhel-{majorver}.dev"
64+
# build only cNs against target with .dev suffix
65+
suffix = ".dev" if is_cs_branch(dist_git_branch) else ""
66+
return f"rhel-{majorver}{suffix}"
6567

6668

6769
async def build_package(

0 commit comments

Comments
 (0)