Don't skip branching for projects with no releases
We have things like devstack and grenade that do not do releases
but still create stable branches. This removes a check that would
skip the branch creation if there are no releases present in the
deliverable.
@@ -105,16 +105,19 @@ def process_release_requests(reporoot, filenames, meta_data):
with open(filename, 'r', encoding='utf-8') as f:
deliverable_data = yaml.load(f.read())
- # If there are no releases listed in this file, skip it.
- if not deliverable_data.get('releases'):
- print(' {} contains no releases, skipping'.format(basename))
+ deliverable_releases = deliverable_data.get('releases', [])
+
+ # If there are no releases or branches listed in this file, skip it.
+ if not deliverable_releases and not deliverable_data.get('branches'):
+ print(' {} contains no releases nor branches, skipping'.format(
+ basename))
continue
# Map the release version to the release contents so we can
# easily get a list of repositories for stable branches.
releases_by_version = {
r['version']: r
- for r in deliverable_data.get('releases', [])
+ for r in deliverable_releases
}
# Determine whether announcements should include a PyPI
@@ -135,6 +138,7 @@ def process_release_requests(reporoot, filenames, meta_data):
os.path.dirname(os.path.abspath(filename))
).lstrip('_')
+ if deliverable_releases:
all_versions = {
rel['version']: rel for rel in deliverable_data['releases']
}
@@ -152,7 +156,6 @@ def process_release_requests(reporoot, filenames, meta_data):
diff_start = this_version.get('diff-start', '-')
# Tag releases.
-
for project in this_version['projects']:
error_count += tag_release(
project['repo'], series_name, version,
@@ -161,7 +164,6 @@ def process_release_requests(reporoot, filenames, meta_data):
)
# Create branches.
-
for branch in deliverable_data.get('branches', []):
location = branch['location']
