Bug fixes in release script.
authorJose A. Rivera <jarrpa@redhat.com>
Tue, 5 Jun 2012 21:23:55 +0000 (16:23 -0500)
committerJose A. Rivera <jarrpa@redhat.com>
Tue, 5 Jun 2012 21:23:55 +0000 (16:23 -0500)
scripts/git_do_release.py

index 8b74068b7b2343a14364334713dab4edc02880fe..71d3c8f11d43222113b3a19bf69d8af3eabd23f3 100755 (executable)
@@ -5,7 +5,7 @@
 #
 # Copyright (C) 2012 Jose A. Rivera <jarrpa@redhat.com>
 #
-# $Date: 2012-06-05 16:21:18 -0500$
+# $Date: 2012-06-05 16:23:55 -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:21:18 -0500 Jose A. Rivera$'
+idstr    = '$Id: git_do_release.py 2012-06-05 16:23:55 -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])
@@ -275,8 +275,9 @@ def do_release( release=defaults['release'],
   # Check if working tree and staging area are clean. If not, either quit,
   # stash the changes, or add the changes to the current commit.
   status = git('status --porcelain').split('\n')
-  print status
-  sys.exit(1)
+  for line in status:
+    if not line:
+      status.pop(status.index(line))
   if len(status):
     tmp = raw_input( 'You have the following uncommitted changes in your\n' + \
                      'environment:\n\n' + '\n'.join(status) + '\n\n' + \