com web/windows: add comment: script/generate_snap_page.p hp

From: Date: Sat, 24 Sep 2016 00:09:01 +0000
Subject: com web/windows: add comment: script/generate_snap_page.p hp
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-25175@lists.php.net to get a copy of this message
Commit: b4d079242ff164e2108440a8978cff7960689796 Author: Anatol Belski <ab@php.net> Sat, 24 Sep 2016 02:09:01 +0200 Parents: 264f74e52558ca3d883d08d4b08fba9e0b719928 Branches: master Link: http://git.php.net/?p=web/windows.git;a=commitdiff;h=b4d079242ff164e2108440a8978cff7960689796 Log: add comment Changed paths: M script/generate_snap_page.php Diff: diff --git a/script/generate_snap_page.php b/script/generate_snap_page.php index 5aa5d9a..6935be3 100644 --- a/script/generate_snap_page.php +++ b/script/generate_snap_page.php @@ -95,14 +95,17 @@ foreach ($active_branches as $branch_name) { $contents = file_get_contents($json_file); $new = json_decode($contents, true); - //var_dump($new, $data[$branch_name]); + + /* Currently we always regenerate the snaps page completely. Alternatively, some more data might need + to be checked, for the case the script execution were caught at unlucky point where some build + upload is in the incomplete state. Both methods have their up and down sides. */ if ($force || substr($new['revision_last'], 0, 7) != substr($data[$branch_name]['revision_last'], 1)) { echo "new revision\n"; $has_new_revision = true; $data[$branch_name] = $new; /* Check if there are possibly more builds than delivered in the $json_file. Scan the dir. */ - $tmp = glob("$rev_dir/*.json"); - foreach ($tmp as $n) { + $gon_in_rev_dir = glob("$rev_dir/*.json"); + foreach ($got_in_rev_dir as $n) { $bld = basename($n, ".json"); /* Do not overwrite, just add what is missing. */ if (!in_array($bld, $data[$branch_name]["builds"])) {

« previous php.webmaster (#25175) next »