Exemplo n.º 1
0
 protected function execute(array $arguments = array(), array $options = array())
 {
     $versionFile = $arguments['version-file'];
     if (!file_exists($versionFile)) {
         throw new Exception('Version file: ' . $versionFile . ' does not exist');
     }
     $configParser = new nbYamlConfigParser();
     $configParser->parseFile($versionFile);
     $initialVersion = nbConfig::get('version');
     $arrayVersion = array();
     $arrayVersion = preg_split('/\\./', $initialVersion);
     $arrayVersion[3]++;
     $finalVersion = join('.', $arrayVersion);
     nbFileSystem::replaceTokens($initialVersion, $finalVersion, $versionFile);
     return true;
 }