PEAR logo

PEAR_PackageFileManager : The Definitive Guide



Removing full changelog

If you don't want to keep history of changes when you generate a new release, then you have only to set option clearchangelog to true.

[Warning] Warning
This option is only available since stable release 1.6.0
  1. <?php
  2. require_once 'PEAR/PackageFileManager2.php';
  3.  
  4. PEAR::setErrorHandling(PEAR_ERROR_DIE);
  5.  
  6. $packagefile = 'C:/php/pear/PEAR_PackageFileManager/package2.xml';
  7.  
  8. $options = array('filelistgenerator' => 'cvs',
  9.     'packagedirectory' => dirname($packagefile),
  10.     'baseinstalldir' => 'PEAR',
  11.     'clearchangelog' => true
  12.     );
  13.  
  14. $p2 = &PEAR_PackageFileManager2::importOptions($packagefile, $options);
  15.  
  16. $p2->generateContents();
  17.  
  18. if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) {
  19.     $p2->writePackageFile();
  20. } else {
  21.     $p2->debugPackageFile();
  22. }
  23. ?>
PEAR_PackageFileManager : The Definitive Guide v 1.6.0 : November 17, 2006