cvs: phpweb /bin bumpRelease
| From: | Hannes Magnusson | Date: | Thu, 06 Sep 2007 15:19:20 +0000 |
| Subject: | cvs: phpweb /bin bumpRelease | ||
| Groups: | php.mirrors php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15@lists.php.net to get a copy of this message | ||
bjori Thu Sep 6 15:19:20 2007 UTC
Modified files:
/phpweb/bin bumpRelease
Log:
Whooopsy.
Fix logic, rather then blindly updating both PHP4 and PHP5 then read in
a major release parameter (4/5) which should be updated
http://cvs.php.net/viewvc.cgi/phpweb/bin/bumpRelease?r1=1.1&r2=1.2&diff_format=u
Index: phpweb/bin/bumpRelease
diff -u phpweb/bin/bumpRelease:1.1 phpweb/bin/bumpRelease:1.2
--- phpweb/bin/bumpRelease:1.1 Thu Sep 6 15:09:10 2007
+++ phpweb/bin/bumpRelease Thu Sep 6 15:19:20 2007
@@ -5,29 +5,25 @@
require "include/version.inc";
require "include/releases.inc";
-$a = array();
-foreach($RELEASES as $major => $rel) {
- list($k, $v) = each($rel);
-
- $tmp = 'PHP_' .$major. '_DATE';
- $v["date"] = $$tmp;
-
- if (is_bool($v["announcement"]) && $v["announcement"]) {
- $v["announcement"] = array("English" => "/releases/" .
str_replace(".", "_", $k) . ".php");
- }
- $v["museum"] = false;
- $a[$major] = array_merge(
- array($k => $v),
- $OLDRELEASES[$major]
- );
-}
+$major = $argv[1];
+isset($RELEASES[$major]) or die("Unkown major version $major");
+
+list($k, $v) = each($RELEASES[$major]);
+
+$tmp = 'PHP_' .$major. '_DATE';
+$v["date"] = $$tmp;
-$keys = array_diff(array_keys($OLDRELEASES), array_keys($RELEASES));
-foreach($keys as $key) {
- $a[$key] = $OLDRELEASES[$key];
+if (is_bool($v["announcement"]) && $v["announcement"]) {
+ $v["announcement"] = array("English" => "/releases/" .
str_replace(".", "_", $k) . ".php");
}
+$v["museum"] = false;
+$a = array_merge(
+ array($k => $v),
+ $OLDRELEASES[$major]
+);
+$OLDRELEASES[$major] = $a;
-file_put_contents("include/releases.inc", array("<?php\n\$OLDRELEASES = ",
var_export($a, true), ";\n"));
+file_put_contents("include/releases.inc", array("<?php\n\$OLDRELEASES = ",
var_export($OLDRELEASES, true), ";\n"));
echo "This was fun \o/\nI hope you remembered to run this script *before* updating
include/version.inc... :)\n";