cvs: phpdoc /scripts/iniupdate generate_changelog.php

From: Date: Fri, 28 Sep 2007 23:21:39 +0000
Subject: cvs: phpdoc /scripts/iniupdate generate_changelog.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-83@lists.php.net to get a copy of this message
nlopess Fri Sep 28 23:21:39 2007 UTC Modified files: /phpdoc/scripts/iniupdate generate_changelog.php Log: improve the permission changelog generator. it now works better with pecl packages (what a headache...) http://cvs.php.net/viewvc.cgi/phpdoc/scripts/iniupdate/generate_changelog.php?r1=1.19&r2=1.20&diff_format=u Index: phpdoc/scripts/iniupdate/generate_changelog.php diff -u phpdoc/scripts/iniupdate/generate_changelog.php:1.19 phpdoc/scripts/iniupdate/generate_changelog.php:1.20 --- phpdoc/scripts/iniupdate/generate_changelog.php:1.19 Fri Sep 28 22:22:08 2007 +++ phpdoc/scripts/iniupdate/generate_changelog.php Fri Sep 28 23:21:39 2007 @@ -150,12 +150,12 @@ if (!$last) $last = $val; if (!$last_tag) $last_tag = $tag; - $majorver = major_version($tag); + $majorver = major_version($tag); $first_major_release = false; + $now_php = is_php($tag); - if (!is_php($tag) && $last_php) { // now we have PECl stuff. reset the major versions array - $majors = array(); - $last_php = false; + if (!$now_php && $last_php) { // now we have PECl stuff. reset the major versions array + $majors = array(); } if (!isset($majors[$majorver])) { @@ -163,17 +163,22 @@ $first_major_release = true; } elseif ($majors[$majorver] !== $val) { // the value isnt the same in this major version - $majors[$majorver] = null; + $majors[$majorver] = false; } - if ($val !== $last) { + // the change is only significant if not comparing between PHP and PECL releases + if ($val !== $last && ($now_php || !$last_php)) { $pkg = is_php($tag) ? 'PHP' : pkg_name($array); if ($output) $output .= ' '; - if ($first_major_release && !empty($majors[$majorver-1])) { - $ver = count($majors) === 2 ? $majorver-1 : "< $majorver"; + if ($first_major_release) { + if (empty($majors[$majorver-1]) || count($majors) > 2) { + $ver = "< $majorver"; + } else { + $ver = $majorver-1; + } } else { $ver = '<= ' . tag2version($last_tag); } @@ -183,6 +188,7 @@ $last = $val; $last_tag = $tag; + $last_php = $now_php; }

« previous php.doc.cvs (#83) next »