diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-03-28 08:39:29 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-03-28 08:39:29 +0200 |
commit | ab869251cdab8f4576e98a6e7f30edf07bdd20a7 (patch) | |
tree | fd90c514fd842870c27d430bdaae1233676fef14 /git2rss | |
parent | a921f6c9902b0917137e13de370dbdd431aba8a7 (diff) |
chain git update-server-info
Diffstat (limited to 'git2rss')
-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'); |