Author: jablko
Date: 2008-10-05 19:31:22 -0700 (Sun, 05 Oct 2008)
New Revision: 1434
Modified:
trunk/qubit/lib/task/ReleaseTask.class.php
Log:
Use sfBaseTask::getFilesystem() function, for consistency with symfony core
tasks.
Modified: trunk/qubit/lib/task/ReleaseTask.class.php
===================================================================
--- trunk/qubit/lib/task/ReleaseTask.class.php 2008-10-06 02:14:29 UTC (rev
1433)
+++ trunk/qubit/lib/task/ReleaseTask.class.php 2008-10-06 02:31:22 UTC (rev
1434)
@@ -25,11 +25,9 @@
*/
protected function execute($arguments = array(), $options = array())
{
- $filesystem = new sfFilesystem;
-
if (($arguments['stability'] == 'beta' || $arguments['stability'] ==
'alpha') && count(explode('.', $arguments['version'])) < 2)
{
- if (preg_match('/Status against revision\:\s+(\d+)\s*$/im',
$filesystem->sh('svn status -u '.sfConfig::get('sf_root_dir')), $matches) < 1)
+ if (preg_match('/Status against revision\:\s+(\d+)\s*$/im',
$this->getFilesystem()->sh('svn status -u '.sfConfig::get('sf_root_dir')),
$matches) < 1)
{
throw new Exception('Unable to find last svn revision');
}
@@ -49,7 +47,7 @@
// 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', $filesystem->sh('svn status --no-ignore -u
'.sfConfig::get('sf_root_dir'))) > 0)
+ if (preg_match('/^[^PSX\n]/m', $this->getFilesystem()->sh('svn status
--no-ignore -u '.sfConfig::get('sf_root_dir'))) > 0)
{
throw new Exception('Local modifications. Release process aborted!');
}
@@ -175,8 +173,8 @@
$doc->save($packageXmlPath);
- print $filesystem->sh('pear package');
+ print $this->getFilesystem()->sh('pear package');
- $filesystem->remove($packageXmlPath);
+ $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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---