Bug fixes to the release script.
[jarrpa/prequel.git] / scripts / git_do_release.py
index 98fdfd6c7ad7edef4afa785de3d7de268abe8bd8..77198d0532f67054f51485972a1d363192adf042 100755 (executable)
@@ -5,7 +5,7 @@
 #
 # Copyright (C) 2012 Jose A. Rivera <jarrpa@redhat.com>
 #
-# $Date: 2012-06-05 16:01:53 -0500$
+# $Date: 2012-06-05 16:17:37 -0500$
 #
 # ---------------------------------------------------------------------------- #
 #
@@ -45,7 +45,7 @@ from ConfigParser import SafeConfigParser
 # Globals ----------------------------------------------------------------------
 #
 verstr   = '%(prog)s Pre-Alpha'
-idstr    = '$Id: git_do_release.py 2012-06-05 16:01:53 -0500 Jose A. Rivera$'
+idstr    = '$Id: git_do_release.py 2012-06-05 16:17:37 -0500 Jose A. Rivera$'
 copystr  = 'Copyright (C) 2012 Jose A. Rivera <jarrpa@redhat.com>'
 gplstr   = '  GNU General Public License, version 3'
 version  = '\n'.join([verstr, idstr[1:-1], copystr, gplstr])
@@ -182,7 +182,7 @@ def update_release_number( release, fileglobs, pathsdict ):
   # Search for matching files.
   matches = []
   reporoot = git('rev-parse --show-toplevel')
-  if 'Globals' in pathsdict.keys and pathsdict['Globals']:
+  if 'Globals' in pathsdict.keys() and pathsdict['Globals']:
     paths = pathsdict['Globals']
   else:
     paths = ['']
@@ -259,8 +259,8 @@ def do_release( release=defaults['release'],
   # currently working on the release branch.
   has_release = False
   on_release  = False
-  for branch in git('branch'):
-    if branch[2:] == rebranch:
+  for branch in git('branch').split('\n'):
+    if rebranch in branch:
       has_release = True
       if branch[0] == '*':
         on_release = True