mirror of
https://github.com/php/web-php.git
synced 2026-03-24 15:22:19 +01:00
Fix logic, rather then blindly updating both PHP4 and PHP5 then read in a major release parameter (4/5) which should be updated
30 lines
835 B
PHP
Executable File
30 lines
835 B
PHP
Executable File
#!/usr/local/bin/php
|
|
<?php
|
|
PHP_SAPI == 'cli' or die("Please run this script using the cli sapi");
|
|
|
|
require "include/version.inc";
|
|
require "include/releases.inc";
|
|
|
|
$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;
|
|
|
|
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($OLDRELEASES, true), ";\n"));
|
|
|
|
echo "This was fun \o/\nI hope you remembered to run this script *before* updating include/version.inc... :)\n";
|
|
|