Commit 81f246c1 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Fix bug in debian branches with distribution

Fix getting branch type for debian branches with distribution
parent 751225ec
......@@ -178,11 +178,15 @@ def get_build_mode():
def normalize_branch_name(branch_name):
"""Normalize branch name by removing debian- if exists"""
brnorm = branch_name
codename = get_distribution_codename()
if brnorm == "debian":
brnorm = "debian-master"
# If it's a debian branch, ignore starting "debian-"
if brnorm.startswith("debian-"):
brnorm = brnorm.replace("debian-", "", 1)
return "master"
elif brnorm == "debian-%s" % codename:
return "master"
elif brnorm.startswith("debian-%s-" % codename):
return brnorm.replace("debian-%s-" % codename, "", 1)
elif brnorm.startswith("debian-"):
return brnorm.replace("debian-", "", 1)
return brnorm
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment