don't apply version validation rules to existing tags

Only apply the version format rules to new tags, so existing tags can be
recorded in the history safely.

Change-Id: I382093931ede7bc6977fb08717eb86b575de065f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2016-06-07 14:32:07 -04:00
parent 3443a41f40
commit 9bce360514
1 changed files with 9 additions and 6 deletions

View File

@ -164,12 +164,6 @@ def main():
link_mode = deliverable_info.get('artifact-link-mode', 'tarball')
for release in deliverable_info['releases']:
for e in versionutils.validate_version(release['version']):
msg = ('could not validate version %r for %s: %s' %
(release['version'], filename, e))
print(msg)
errors.append(msg)
for project in release['projects']:
# Check for release jobs (if we ship a tarball)
if link_mode != 'none':
@ -258,6 +252,15 @@ def main():
print('not included in previous release for %s: %s' %
(prev_version, ', '.join(sorted(prev_projects))))
else:
for e in versionutils.validate_version(
release['version']):
msg = ('could not validate version %r '
'for %s: %s' %
(release['version'], filename, e))
print(msg)
errors.append(msg)
# Check to see if we are re-tagging the same
# commit with a new version.
old_sha = gitutils.sha_for_tag(