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

Kevin Harwell asteriskteam at digium.com
Wed Feb 21 18:01:29 CST 2018


Kevin Harwell has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.asterisk.org:29418/repotools refs/changes/67/8367/1

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: newchange
Gerrit-Change-Id: I81c3ca6b33b6d119019a020f4cb5f287805bf71a
Gerrit-Change-Number: 8367
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180221/bfd0db88/attachment.html>


More information about the asterisk-code-review mailing list