updateChanges() public method

Update the CHANGES file in case it exists.
public updateChanges ( string $version ) : null
$version string Version string that should be added.
return null
Ejemplo n.º 1
0
    public function testUpdateSentinel()
    {
        $tmp_dir = $this->getTemporaryDirectory();
        $sentinel = new Horde_Release_Sentinel($tmp_dir);
        mkdir($tmp_dir . '/docs');
        file_put_contents($tmp_dir . '/docs/CHANGES', "\n=OLD=\n");
        $sentinel->updateChanges('1.0.0');
        $this->assertEquals('------
v1.0.0
------




=OLD=
', file_get_contents($tmp_dir . '/docs/CHANGES'));
    }
Ejemplo n.º 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");
     }
 }