Copyright 2011-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Mike Hardy
Автор: Jan Schneider (jan@horde.org)
Автор: Gunnar Wrobel (wrobel@pardus.de)
Пример #1
0
    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'));
    }
Пример #2
0
 /**
  * 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");
     }
 }