Update roagen.php to include latest git show
Include output of `git show` as comments at the top of output files
This commit is contained in:
parent
880ef30c25
commit
be10fa318f
|
@ -239,6 +239,7 @@ $json = json_encode ($roas, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
|
||||||
|
|
||||||
// Write JSON to file
|
// Write JSON to file
|
||||||
$fp = fopen ('roa/export_dn42.json', 'w');
|
$fp = fopen ('roa/export_dn42.json', 'w');
|
||||||
|
fwrite ($fp, shell_exec ("/usr/bin/git -C ../registry/ show | sed 's/^/\/\/ /g'"));
|
||||||
fwrite ($fp, $json);
|
fwrite ($fp, $json);
|
||||||
fclose ($fp);
|
fclose ($fp);
|
||||||
|
|
||||||
|
@ -247,6 +248,10 @@ $fq = fopen ('roa/bird_roa_dn42.conf', 'w');
|
||||||
$fq4 = fopen ('roa/bird4_roa_dn42.conf', 'w');
|
$fq4 = fopen ('roa/bird4_roa_dn42.conf', 'w');
|
||||||
$fq6 = fopen ('roa/bird6_roa_dn42.conf', 'w');
|
$fq6 = fopen ('roa/bird6_roa_dn42.conf', 'w');
|
||||||
|
|
||||||
|
fwrite ($fq, shell_exec ("/usr/bin/git -C ../registry/ show | sed 's/^/# /g'"));
|
||||||
|
fwrite ($fq4, shell_exec ("/usr/bin/git -C ../registry/ show | sed 's/^/# /g'"));
|
||||||
|
fwrite ($fq6, shell_exec ("/usr/bin/git -C ../registry/ show | sed 's/^/# /g'"));
|
||||||
|
|
||||||
foreach ($roas["roas"] as $roa)
|
foreach ($roas["roas"] as $roa)
|
||||||
{
|
{
|
||||||
$prfx = $roa["prefix"];
|
$prfx = $roa["prefix"];
|
||||||
|
|
Loading…
Reference in a new issue