[Asterisk-code-review] mkrelease.py: Fix non-asterisk ChangeLog generation. (repotools[master])

Joshua Colp asteriskteam at digium.com
Mon Jan 30 10:42:28 CST 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4841 )

Change subject: mkrelease.py: Fix non-asterisk ChangeLog generation.
......................................................................


mkrelease.py: Fix non-asterisk ChangeLog generation.

* Fix a couple PEP8 diagnostics.

Change-Id: I05fbc31df67638d18fe29ecff2a64139d45202e6
---
M mkrelease.py
1 file changed, 12 insertions(+), 3 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Verified



diff --git a/mkrelease.py b/mkrelease.py
index 047a327..851dec2 100755
--- a/mkrelease.py
+++ b/mkrelease.py
@@ -66,6 +66,7 @@
 # The ftp_project name
 ftp_project = ''
 
+
 class ExitException(Exception):
     """Exception raised by prompt_to_continue to stop the script"""
     pass
@@ -264,6 +265,14 @@
         summary - The release summary object
         """
 
+        # For non-asterisk projects we will follow the summary history.
+        # libpri and libss7 don't use release candidates or betas.
+        # libpri and libss7 are not likely to have any lengthy development
+        # release branches other than master again so their release series
+        # will be one-off patch version 0 release branches from master.
+        # 1.5.0 -> 1.6.0 -> 1.7.0
+        #
+        # For the asterisk project:
         # Most times, the history of the ChangeLog will match the release
         # summaries. However, on the first full release (patch version is 0),
         # the release summaries are re-generated, while the ChangeLog should
@@ -275,7 +284,7 @@
         # beta. Full releases will have no changes between the latest RC and
         # HEAD. Therefore, you're guaranteed to try to create a summary of zero
         # changes.
-        if version_object.patch == 0:
+        if options.project.lower() == 'asterisk' and version_object.patch == 0:
             if len(version_object.modifiers) != 0:
                 sum_opts = ReleaseSummaryOptions()
                 sum_opts.start_tag = start_version
@@ -486,7 +495,7 @@
         # Different major version. This means this is a *big* jump that
         # can't be expressed in a diff. Bail.
         LOGGER.debug("This version '{0}' is a new major version; bypassing "
-               "diff".format(version))
+                     "diff".format(version))
         return
 
     if len(version_object.modifiers) == 0:
@@ -516,7 +525,7 @@
     os.chdir(os.path.join(options.local_root, options.project))
     file_name = '{0}-patch'.format(release_name)
     LOGGER.debug("Generating diff from '{0}' to '{1}'".format(diff_version,
-                                                        version))
+                                                              version))
     os.system('git diff {0}..{1} > {2}'.format(diff_version,
                                                version,
                                                file_name))

-- 
To view, visit https://gerrit.asterisk.org/4841
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I05fbc31df67638d18fe29ecff2a64139d45202e6
Gerrit-PatchSet: 1
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list