diff options
-rwxr-xr-x | git2rss | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -27,6 +27,7 @@ use Suin\RSSWriter\Item; if (file_exists(__DIR__ . '/git2rss.json')) { $json = file_get_contents(__DIR__ . '/git2rss.json'); $histo = json_decode($json, true); + printf("RSS %d entries loaded\n", count($histo)); } else { $histo = array(); } @@ -42,7 +43,7 @@ if (substr($entry['repo'], -4) != '.git') { $entry['repo'] .= '.git'; } $short = substr($entry['hash'], 0, 7); -echo "\nRSS ENTRY: ${entry['author']} pushed to ${entry['repo']} (${entry['head']},$short): ${entry['comment']}\n"; +echo "RSS new entry: ${entry['author']} pushed to ${entry['repo']} (${entry['head']},$short): ${entry['comment']}\n"; // 50 recent changes, and save $histo = array_merge([$entry], $histo); @@ -82,4 +83,8 @@ foreach ($histo as $entry) { // Save RSS file_put_contents(__DIR__ . '/index.html', $feed); +printf("RSS %d entries saved\n", count($histo)); + +// standard usage +passthru('git update-server-info'); |