[asterisk-commits] mkrelease.py: Certified releases were not being pushed to repo (repotools[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 15 14:27:01 CST 2016


Joshua Colp has submitted this change and it was merged.

Change subject: mkrelease.py: Certified releases were not being pushed to repo
......................................................................


mkrelease.py: Certified releases were not being pushed to repo

When making certified releases the script was using the passed in unmodified
project and version as the inputs to the push-release.sh script. This works
fine for a regular Asterisk release. However the passed in certified version
contains a '/'. This made it so when grepping for files they could not be found
since the files were created using a '-' (during the release process the '/'
gets converted at times to a '-'. This patch makes it so the '/' gets replaced
as well when the version is being passed to the push-release.sh script.

Also, the current svn repo where things are stored expects things under
a 'certified-asterisk' directory. The project being passed into the
push-release.sh script was just 'asterisk'. This makes it so the branch
name, in this case 'certified', gets prepended and passed to the script.

Change-Id: I958614904185b3813355c5db7de2ab0182373f07
---
M mkrelease.py
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/mkrelease.py b/mkrelease.py
index 77f362a..a66fe07 100755
--- a/mkrelease.py
+++ b/mkrelease.py
@@ -55,6 +55,9 @@
 # The mainline branch that the working branch is based off of
 mainline = None
 
+# The ftp_project name
+ftp_project = ''
+
 class ExitException(Exception):
     """Exception raised by prompt_to_continue to stop the script"""
     pass
@@ -103,12 +106,17 @@
     global release_name
     global interactive
     global debug
+    global ftp_project
 
     version = options.version
     version_object = AsteriskVersion.create_from_string(version)
     release_name = '{0}-{1}'.format(options.project, version.replace('/', '-'))
     interactive = options.interactive
     debug = options.debug
+
+    i = version.find('/')
+    ftp_project = ('{0}-{1}'.format(version[:i], options.project) if i > 0
+                   else options.project)
 
 
 def prepare_repo(options):
@@ -650,7 +658,7 @@
     create_final_archive(tag_archive)
 
     # Push it live!
-    os.system('push-release.sh {0} {1}'.format(version, options.project))
+    os.system('push-release.sh {0} {1}'.format(version.replace('/', '-'), ftp_project))
 
     print "Congratulations on the successful creation of {0} {1}!".format(
         options.project, options.version)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I958614904185b3813355c5db7de2ab0182373f07
Gerrit-PatchSet: 2
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list