Author: david
Date: Mon Nov  8 17:15:50 2010
New Revision: 8804

Log:
sfFilesystem::sh() removed in symfony 1.4

Modified:
   trunk/lib/task/ReleaseTask.class.php

Modified: trunk/lib/task/ReleaseTask.class.php
==============================================================================
--- trunk/lib/task/ReleaseTask.class.php        Mon Nov  8 13:37:08 2010        
(r8803)
+++ trunk/lib/task/ReleaseTask.class.php        Mon Nov  8 17:15:50 2010        
(r8804)
@@ -27,7 +27,8 @@
   {
     if (($arguments['stability'] == 'beta' || $arguments['stability'] == 
'alpha') && count(explode('.', $arguments['version'])) < 2)
     {
-      if (preg_match('/Status against revision\:\s+(\d+)\s*$/im', 
$this->getFilesystem()->sh('svn status -u '.sfConfig::get('sf_root_dir')), 
$matches) < 1)
+      list ($stdout, $stderr) = $this->getFilesystem()->execute('svn status -u 
'.sfConfig::get('sf_root_dir'));
+      if (0 < strlen($stderr) || preg_match('/Status against 
revision\:\s+(\d+)\s*$/im', $stdout, $matches) < 1)
       {
         throw new Exception('Unable to find last svn revision');
       }
@@ -47,7 +48,12 @@
 
     // All lines which start with a character other than 'P' ('Performing...'),
     // 'S' ('Status...'), or 'X' (externals definition) are local changes.
-    if (preg_match('/^[^PSX\n]/m', $this->getFilesystem()->sh('svn status 
--no-ignore -u '.sfConfig::get('sf_root_dir'))) > 0)
+    list($stdout, $stderr) = $this->getFilesystem()->execute('svn status 
--no-ignore -u '.sfConfig::get('sf_root_dir'));
+    if (0 < strlen($stderr))
+    {
+      throw new Exception("svn error: $stderr");
+    }
+    else if (preg_match('/^[^PSX\n]/m', $stdout) > 0)
     {
       throw new Exception('Local modifications. Release process aborted!');
     }
@@ -155,7 +161,7 @@
 
     $doc->save($packageXmlPath);
 
-    print $this->getFilesystem()->sh('pear package');
+    print implode('', $this->getFilesystem()->execute('pear package'));
 
     $this->getFilesystem()->remove($packageXmlPath);
   }

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to