[Asterisk-code-review] mkrelease.py: Allow old README files to be copied (repotools[master])

Joshua Colp asteriskteam at digium.com
Fri Feb 23 08:10:21 CST 2018


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

Change subject: mkrelease.py: Allow old README files to be copied
......................................................................

mkrelease.py: Allow old README files to be copied

An update was made to Asterisk that changed the README file to README.md. The
mkrelease script was updated to account for that, but that Asterisk change did
not go into all branches.

This patch makes it so older branches that do not contain that change will
create the release with the old style README.

Change-Id: I81c3ca6b33b6d119019a020f4cb5f287805bf71a
---
M mkrelease.py
1 file changed, 7 insertions(+), 2 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Corey Farrell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/mkrelease.py b/mkrelease.py
index b70030e..8806eac 100755
--- a/mkrelease.py
+++ b/mkrelease.py
@@ -565,8 +565,13 @@
         Keyword Arguments:
         path - The location of the extracted Asterisk release
         """
-        shutil.copyfile(os.path.join(path, 'README.md'),
-                        'README-{0}.md'.format(version.replace('/', '-')))
+        try:
+            shutil.copyfile(os.path.join(path, 'README.md'),
+                            'README-{0}.md'.format(version.replace('/', '-')))
+        except:
+            shutil.copyfile(os.path.join(path, 'README'),
+                            'README-{0}'.format(version.replace('/', '-')))
+
         shutil.copyfile(os.path.join(path, 'ChangeLog'),
                         'ChangeLog-{0}'.format(version.replace('/', '-')))
         summary_prefix = '{0}-summary'.format(release_name)

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

Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I81c3ca6b33b6d119019a020f4cb5f287805bf71a
Gerrit-Change-Number: 8367
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180223/76455979/attachment.html>


More information about the asterisk-code-review mailing list