コード例 #1
0
ファイル: release.php プロジェクト: bigcalm/urlcatcher
 */
require_once dirname(__FILE__) . '/../../lib/exception/sfException.class.php';
require_once dirname(__FILE__) . '/../../lib/task/sfFilesystem.class.php';
require_once dirname(__FILE__) . '/../../lib/util/sfFinder.class.php';
require_once dirname(__FILE__) . '/../../lib/vendor/lime/lime.php';
if (!isset($argv[1])) {
    throw new Exception('You must provide version prefix.');
}
if (!isset($argv[2])) {
    throw new Exception('You must provide stability status (alpha/beta/stable).');
}
$stability = $argv[2];
$filesystem = new sfFilesystem();
if (($stability == 'beta' || $stability == 'alpha') && count(explode('.', $argv[1])) < 2) {
    $version_prefix = $argv[1];
    $result = $filesystem->sh('svn status -u ' . getcwd());
    if (preg_match('/Status against revision\\:\\s+(\\d+)\\s*$/im', $result, $match)) {
        $version = $match[1];
    }
    if (!isset($version)) {
        throw new Exception('Unable to find last SVN revision.');
    }
    // make a PEAR compatible version
    $version = $version_prefix . '.' . $version;
} else {
    $version = $argv[1];
}
print sprintf("Releasing symfony version \"%s\".\n", $version);
// tests
$result = $filesystem->sh('php data/bin/symfony symfony:test');
if (0 != $result) {
コード例 #2
0
 protected function _cleanupAdminGenModules()
 {
     $fs = new sfFilesystem($this->getContext()->getEventDispatcher(), new sfFormatter());
     foreach ($this->_modules as $module) {
         $this->info('Removing admin gen module "' . $module . '"');
         $fs->sh('rm -rf ' . sfConfig::get('sf_app_module_dir') . '/' . $module);
     }
     $fs->sh('rm -rf ' . sfConfig::get('sf_test_dir') . '/functional/backend');
     $fs->sh('rm -rf ' . sfConfig::get('sf_data_dir') . '/*.sqlite');
 }
コード例 #3
0
 /**
  * Calls lessc compiler for LESS file
  *
  * @param   string  $lessFile a LESS file
  * @param   string  $cssFile  a CSS file
  * 
  * @return  string            output
  */
 public function callLesscCompiler($lessFile, $cssFile)
 {
     // Setting current file. We will output this var if compiler throws error
     $this->currentFile = $lessFile;
     // Compile with lessc
     $fs = new sfFilesystem();
     $command = sprintf('lessc "%s" "%s"', $lessFile, $cssFile);
     if ('1.3.0' <= SYMFONY_VERSION) {
         try {
             $fs->execute($command, null, array($this, 'throwCompilerError'));
         } catch (RuntimeException $e) {
             return false;
         }
     } else {
         $fs->sh($command);
     }
     // Setting current file to null
     $this->currentFile = null;
     return file_get_contents($cssFile);
 }
コード例 #4
0
 /**
  * Calls lessc compiler for LESS file
  *
  * @param string $lessFile a LESS file
  * @param string $cssFile a CSS file
  * @return string output
  */
 public function callLesscCompiler($lessFile, $cssFile)
 {
     // Compile with lessc
     $fs = new sfFilesystem();
     $command = sprintf('lessc%s "%s" "%s"', $this->isUseGrowl() ? ' -g' : '', $lessFile, $cssFile);
     if ('1.3.0' <= SYMFONY_VERSION) {
         try {
             $fs->execute($command, null, array($this, 'throwCompilerError'));
         } catch (RuntimeException $e) {
             return false;
         }
     } else {
         $fs->sh($command);
     }
     return file_get_contents($cssFile);
 }
コード例 #5
0
ファイル: release.php プロジェクト: Esleelkartea/legedia-ESLE
 */
require_once dirname(__FILE__) . '/../../lib/exception/sfException.class.php';
require_once dirname(__FILE__) . '/../../lib/task/sfFilesystem.class.php';
require_once dirname(__FILE__) . '/../../lib/util/sfFinder.class.php';
require_once dirname(__FILE__) . '/../../lib/vendor/lime/lime.php';
if (!isset($argv[1])) {
    throw new Exception('You must provide version prefix.');
}
if (!isset($argv[2])) {
    throw new Exception('You must provide stability status (alpha/beta/stable).');
}
$stability = $argv[2];
$filesystem = new sfFilesystem();
if (($stability == 'beta' || $stability == 'alpha') && count(explode('.', $argv[1])) < 2) {
    $version_prefix = $argv[1];
    $result = $filesystem->sh('svn status -u ' . getcwd());
    if (preg_match('/Status against revision\\:\\s+(\\d+)\\s*$/im', $result, $match)) {
        $version = $match[1];
    }
    if (!isset($version)) {
        throw new Exception('Unable to find last SVN revision.');
    }
    // make a PEAR compatible version
    $version = $version_prefix . '.' . $version;
} else {
    $version = $argv[1];
}
print sprintf("Releasing symfony version \"%s\".\n", $version);
// tests
$result = $filesystem->sh('php test/bin/prove.php');
if (0 != $result) {
コード例 #6
0
ファイル: sfLESS.class.php プロジェクト: xfifix/Jenkins-Khan
 /**
  * Calls lessc compiler for LESS file
  *
  * @param   string  $lessFile a LESS file
  * @param   string  $cssFile  a CSS file
  *
  * @return  string            output
  */
 public function callLesscCompiler($lessFile, $cssFile)
 {
     // Setting current file. We will output this var if compiler throws error
     $this->currentFile = $lessFile;
     if (self::getConfig()->isUseLessphp()) {
         require_once sfConfig::get('sf_lib_dir') . '/vendor/lessphp/lessc.inc.php';
         $less = new lessc($lessFile);
         file_put_contents($cssFile, $less->parse());
     } else {
         // Compile with lessc
         $fs = new sfFilesystem();
         $command = sprintf('lessc "%s" "%s"', $lessFile, $cssFile);
         if ('1.3.0' <= SYMFONY_VERSION) {
             try {
                 $fs->execute($command, null, array($this, 'throwCompilerError'));
             } catch (RuntimeException $e) {
                 return false;
             }
         } else {
             $fs->sh($command);
         }
     }
     // Setting current file to null
     $this->currentFile = null;
     return file_get_contents($cssFile);
 }