Fix branch to series matching logic in job updates
Missed in Id58f439052b4ea6b092b87682576a746433dcc27 that the branch name passed in when determining the next series name will be of the form 'stable/series', resulting in not finding the next name and job update logic being skipped. This adjusts the branch name to properly match the series name. Change-Id: Ie4102ceb0d12b7d98919ddb89b8e17df1859fa6a Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
5e7bd5ba36
commit
ebee7e0d7c
|
@ -54,10 +54,11 @@ BRANCH_SCRIPT = os.path.join(BINDIR, 'make_branch.sh')
|
||||||
def nextbranchname(branchname, reporoot):
|
def nextbranchname(branchname, reporoot):
|
||||||
"""Returns a string containing the next development branchname."""
|
"""Returns a string containing the next development branchname."""
|
||||||
datafile = 'data/series_status.yaml'
|
datafile = 'data/series_status.yaml'
|
||||||
|
branch_name = branchname.replace('stable/', '')
|
||||||
with open(os.path.join(reporoot, datafile), 'r') as seriesstatusf:
|
with open(os.path.join(reporoot, datafile), 'r') as seriesstatusf:
|
||||||
series = yaml.safe_load(seriesstatusf)
|
series = yaml.safe_load(seriesstatusf)
|
||||||
for nextseries, currentseries in zip(series, series[1:]):
|
for nextseries, currentseries in zip(series, series[1:]):
|
||||||
if currentseries['name'] == branchname:
|
if currentseries['name'] == branch_name:
|
||||||
return nextseries['name']
|
return nextseries['name']
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue