diff --git a/Doxyfile b/Doxyfile index 417ed045..da12f467 100644 --- a/Doxyfile +++ b/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = HTMLPurifier # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.1.0 +PROJECT_NUMBER = 3.1.0-dev # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/NEWS b/NEWS index 7007d737..6d0d2539 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier . Internal change ========================== -3.1.0, released 2008-04-24 +3.1.0, unknown release date # Unnecessary references to objects (vestiges of PHP4) removed from method signatures. The following methods do not need references when assigning from them and will result in E_STRICT errors if you try: diff --git a/VERSION b/VERSION index a0cd9f0c..fee2d3e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.0 \ No newline at end of file +3.1.0-dev \ No newline at end of file diff --git a/configdoc/usage.xml b/configdoc/usage.xml index 9b04d927..c2eb4413 100644 --- a/configdoc/usage.xml +++ b/configdoc/usage.xml @@ -2,7 +2,7 @@ - 129 + 132 85 diff --git a/library/HTMLPurifier.includes.php b/library/HTMLPurifier.includes.php index 0e630b56..e7ba0cc1 100644 --- a/library/HTMLPurifier.includes.php +++ b/library/HTMLPurifier.includes.php @@ -7,7 +7,7 @@ * primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS * FILE, changes will be overwritten the next time the script is run. * - * @version 3.1.0 + * @version 3.1.0-dev * * @warning * You must *not* include any other HTML Purifier files before this file, diff --git a/library/HTMLPurifier.php b/library/HTMLPurifier.php index 6f65b305..135b9a0d 100644 --- a/library/HTMLPurifier.php +++ b/library/HTMLPurifier.php @@ -19,7 +19,7 @@ */ /* - HTML Purifier 3.1.0 - Standards Compliant HTML Filtering + HTML Purifier 3.1.0-dev - Standards Compliant HTML Filtering Copyright (C) 2006-2008 Edward Z. Yang This library is free software; you can redistribute it and/or @@ -55,7 +55,10 @@ class HTMLPurifier { /** Version of HTML Purifier */ - public $version = '3.1.0'; + public $version = '3.1.0-dev'; + + /** Constant with version of HTML Purifier */ + const version = '3.1.0-dev'; /** Global configuration object */ public $config; diff --git a/library/HTMLPurifier/Config.php b/library/HTMLPurifier/Config.php index 3533e573..bb854849 100644 --- a/library/HTMLPurifier/Config.php +++ b/library/HTMLPurifier/Config.php @@ -20,7 +20,7 @@ class HTMLPurifier_Config /** * HTML Purifier's version */ - public $version = '3.1.0'; + public $version = '3.1.0-dev'; /** * Bool indicator whether or not to automatically finalize diff --git a/release1-update.php b/release1-update.php index c611b324..8f02c16b 100644 --- a/release1-update.php +++ b/release1-update.php @@ -24,21 +24,23 @@ $version = trim($argv[1]); file_put_contents('VERSION', $version); // ...in NEWS -$date = date('Y-m-d'); -$news_c = str_replace( - $l = "$version, unknown release date", - "$version, released $date", - file_get_contents('NEWS'), - $c -); -if (!$c) { - echo 'Could not update NEWS, missing ' . $l . PHP_EOL; - exit; -} elseif ($c > 1) { - echo 'More than one release declaration in NEWS replaced' . PHP_EOL; - exit; +if ($is_dev = (strpos($version, 'dev') === false)) { + $date = date('Y-m-d'); + $news_c = str_replace( + $l = "$version, unknown release date", + "$version, released $date", + file_get_contents('NEWS'), + $c + ); + if (!$c) { + echo 'Could not update NEWS, missing ' . $l . PHP_EOL; + exit; + } elseif ($c > 1) { + echo 'More than one release declaration in NEWS replaced' . PHP_EOL; + exit; + } + file_put_contents('NEWS', $news_c); } -file_put_contents('NEWS', $news_c); // ...in Doxyfile $doxyfile_c = preg_replace( @@ -72,7 +74,17 @@ $htmlpurifier_c = preg_replace( 1, $c ); if (!$c) { - echo 'Could not update HTMLPurifier.php, missing var $version.' . PHP_EOL; + echo 'Could not update HTMLPurifier.php, missing public $version.' . PHP_EOL; + exit; +} +$htmlpurifier_c = preg_replace( + '/const version = \'.+?\';/', + "const version = '$version';", + $htmlpurifier_c, + 1, $c +); +if (!$c) { + echo 'Could not update HTMLPurifier.php, missing const $version.' . PHP_EOL; exit; } file_put_contents('library/HTMLPurifier.php', $htmlpurifier_c); @@ -85,12 +97,12 @@ $config_c = preg_replace( 1, $c ); if (!$c) { - echo 'Could not update Config.php, missing var $version.' . PHP_EOL; + echo 'Could not update Config.php, missing public $version.' . PHP_EOL; exit; } file_put_contents('library/HTMLPurifier/Config.php', $config_c); passthru('php maintenance/flush.php'); -echo "Review changes, write something in WHATSNEW, and then SVN commit with log 'Release $version.'" . PHP_EOL; - +if ($is_dev) echo "Review changes, write something in WHATSNEW, and then SVN commit with log 'Release $version.'" . PHP_EOL; +else echo "Numbers updated to dev, no other modifications necessary!";