Opened 5 years ago

Closed 5 years ago

#4316 enhancement closed fixed (fixed)

Changing versions in NEWS files for pre-release increments is too hard

Reported by: jml Owned by:
Priority: normal Milestone: totally automated release infrastructure
Component: release management Keywords: review
Cc: Branch: branches/drop-pre-release-4316
(diff, github, buildbot, log)
Author: jml Launchpad Bug:

Description

change-versions doesn't change the version in NEWS files. build-news adds a new heading on top of the previous pre-release heading, e.g.

Twisted Core 10.0.0pre2 (2010-02-24)
====================================

Twisted Core 10.0.0pre1 (2010-02-21)
====================================

Ideally there'd be some way to bump the pre-release version. Perhaps change-versions should do this?

Change History (8)

comment:1 Changed 5 years ago by jml

  • Milestone set to regular-releases

comment:2 Changed 5 years ago by jml

  • Author set to jml
  • Branch set to branches/drop-pre-release-4316

(In [29225]) Branching to 'drop-pre-release-4316'

comment:3 Changed 5 years ago by jml

  • Keywords review added
  • Owner radix deleted

In this branch, change-versions will alter the version and date in all NEWS files if the current release is a pre-release.

comment:4 Changed 5 years ago by TimAllen

  • Owner set to TimAllen

comment:5 Changed 5 years ago by TimAllen

  • Keywords review removed
  • Owner changed from TimAllen to jml

My only change would be:

--- a/twisted/python/_release.py
+++ b/twisted/python/_release.py
@@ -143,7 +143,7 @@ def changeAllProjectVersions(root, versionTemplate, today=None):
                              versionTemplate.minor, versionTemplate.micro,
                              prerelease=versionTemplate.prerelease)
 
-        if project.getVersion().prerelease:
+        if oldVersion.prerelease:
             builder = NewsBuilder()
             builder._changeNewsVersion(
                 root.child("NEWS"), builder._getNewsName(project),

...since every other call to project.getVersion() in this function has been replaced by oldVersion.

With that change, +1 for merging from me.

comment:6 Changed 5 years ago by jml

  • Keywords review added
  • Owner jml deleted

Done & thanks for the review. I'm going to hold off on landing this branch until a core dev reviews it, to satisfy my own paranoia.

comment:7 Changed 5 years ago by jml

  • Resolution set to fixed
  • Status changed from new to closed

(In [29242]) Merge drop-pre-release-4316

  • Author: jml
  • Reviewer: TimAllen
  • Fixes #4316

When running change-version on a pre-release version of Twisted, change
the references to the pre-release version in NEWS entries.

comment:8 Changed 4 years ago by <automation>

Note: See TracTickets for help on using tickets.