fix latest release handling in branch validation
Not all repos that create stable branches will have tagged releases, so only check the latest release when we need to. Change-Id: Ieb51f8f280a6127ff0adc9432acfe65c809ac764 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
5b6ff05d48
commit
b2bf0e0c4d
@ -1365,8 +1365,6 @@ def validate_stable_branches(deliv, context):
|
||||
|
||||
branch_mode = deliv.stable_branch_type
|
||||
|
||||
latest_release = deliv.releases[-1]
|
||||
|
||||
known_series = sorted(list(
|
||||
d for d in os.listdir('deliverables')
|
||||
if not d.startswith('_')
|
||||
@ -1414,6 +1412,8 @@ def validate_stable_branches(deliv, context):
|
||||
print('{} branch already exists, skipping validation'.format(
|
||||
branch.name))
|
||||
continue
|
||||
|
||||
latest_release = deliv.releases[-1]
|
||||
if location != latest_release.version:
|
||||
context.error(
|
||||
('stable branches must be created from the latest '
|
||||
|
Loading…
Reference in New Issue
Block a user