]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
strip last lines
authorMathias Klette <mathias.klette@profitbricks.com>
Mon, 4 Jun 2012 10:19:46 +0000 (12:19 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Mon, 4 Jun 2012 10:19:46 +0000 (12:19 +0200)
debian_build.py

index acb642247a1952e377210f9c9c06893cf7583beb..003d69a86a0d10fc375ae5c20c6c99f6ec0f259f 100755 (executable)
@@ -260,15 +260,15 @@ if __name__ == '__main__':
     gitcmd = git.Git('.')
     logger.debug(
         'git reset --hard HEAD:\n%s'
-        %(gitcmd.reset('--hard','HEAD'))
+        %(gitcmd.reset('--hard','HEAD').strip())
     )
     logger.debug(
-        'git clean -fdx:\n%s'
-        %(gitcmd.execute(['sudo','git','clean','-fdx']))
+        'sudo git clean -fdx:\n%s'
+        %(gitcmd.execute(['sudo','git','clean','-fdx']).strip())
     )
     logger.debug(
         'git branch -D %s\n%s'
-        %(localname,gitcmd.branch('-D','%s' %(localname),with_exceptions=False))
+        %(localname,gitcmd.branch('-D','%s' %(localname),with_exceptions=False).strip())
     )
 
     try:
@@ -278,13 +278,13 @@ if __name__ == '__main__':
             %(
                 localname,
                 remotename,
-                gitcmd.checkout('-b','%s' %(localname),'%s' %(remotename))
+                gitcmd.checkout('-b','%s' %(localname),'%s' %(remotename).strip())
             )
         )
     except Exception, exception:
         raise Exception('Failure while checking out Git clone:\n%s' %(exception))
     else:
-        logger.debug('Status is now:\n%s' %( gitcmd.status() ))
+        logger.debug('Status is now:\n%s' %( gitcmd.status().strip() ))
 
     # cleanup existing *orig.tar.gz
     if os.path.isdir(BUILD_AREA):