public function testUpdateBundle() { $tmp_dir = $this->getTemporaryDirectory(); $sentinel = new Horde_Release_Sentinel($tmp_dir); mkdir($tmp_dir . '/lib'); file_put_contents($tmp_dir . '/lib/Bundle.php', "class Horde_Bundle {\nconst VERSION = '0.0.0';\n}\n"); $mode = fileperms($tmp_dir . '/lib/Bundle.php'); $sentinel->updateApplication('1.0.0'); $this->assertEquals('class Horde_Bundle { const VERSION = \'1.0.0\'; } ', file_get_contents($tmp_dir . '/lib/Bundle.php')); clearstatcache(); $this->assertEquals($mode, fileperms($tmp_dir . '/lib/Bundle.php')); }
/** * Update the CHANGES file with the new version number */ public function updateSentinel() { $module = $this->_options['module']; print "Updating CHANGES file for {$module}\n"; $filename_only = 'CHANGES'; $updater = new Horde_Release_Sentinel($this->_directoryName); $updater->updateChanges($this->_newSourceVersionStringPlain); if (!$this->_options['nocommit']) { system("cd {$this->_directoryName}/docs/; cvs commit -f -m \"Tarball script: building new {$module} release - {$this->_newSourceVersionString}\" {$filename_only} > /dev/null 2>&1"); } }