do not require stable branches from latest release for independent projects

Independent projects may mix releases from different series in the
file, so we should not require that they follow the rule of branching
from the most recently tagged release.

Change-Id: Ic97592d31ef8be791074155373864ba1e0d3bd6d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-08-29 16:50:46 -04:00
parent af88d57b87
commit 724e80dc27

View File

@ -1416,13 +1416,17 @@ def validate_stable_branches(deliv, context):
branch.name))
continue
latest_release = deliv.releases[-1]
if location != latest_release.version:
context.error(
('stable branches must be created from the latest '
'tagged release, and %s for %s does not match %s' % (
location, branch.name, latest_release.version))
)
if deliv.is_independent:
print('"latest release" rule does not apply '
'to independent repositories, skipping')
else:
latest_release = deliv.releases[-1]
if location != latest_release.version:
context.error(
('stable branches must be created from the latest '
'tagged release, and %s for %s does not match %s' % (
location, branch.name, latest_release.version))
)
elif branch_mode == 'tagless':
if not isinstance(location, dict):