Bug: fix error in write* functions
This commit is contained in:
parent
6ead86db65
commit
6f08a272fd
|
@ -75,7 +75,7 @@ function commitPushToRemotes ()
|
||||||
echo shell_exec ("./update.sh 2>&1");
|
echo shell_exec ("./update.sh 2>&1");
|
||||||
}
|
}
|
||||||
|
|
||||||
function writeBirdConfig ()
|
function writeBirdConfig ($json, $roas)
|
||||||
{
|
{
|
||||||
$fq = fopen ('roa/bird_roa_dn42.conf', 'w');
|
$fq = fopen ('roa/bird_roa_dn42.conf', 'w');
|
||||||
$fq4 = fopen ('roa/bird4_roa_dn42.conf', 'w');
|
$fq4 = fopen ('roa/bird4_roa_dn42.conf', 'w');
|
||||||
|
@ -106,7 +106,7 @@ function writeBirdConfig ()
|
||||||
fclose ($fq6);
|
fclose ($fq6);
|
||||||
}
|
}
|
||||||
|
|
||||||
function writeRoutinatorExceptionFile ()
|
function writeRoutinatorExceptionFile ($json)
|
||||||
{
|
{
|
||||||
$fp = fopen('roa/export_rfc8416_dn42.json', 'w');
|
$fp = fopen('roa/export_rfc8416_dn42.json', 'w');
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ function writeRoutinatorExceptionFile ()
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
function writeExportJSON ()
|
function writeExportJSON ($json)
|
||||||
{
|
{
|
||||||
$fp = fopen ('roa/export_dn42.json', 'w');
|
$fp = fopen ('roa/export_dn42.json', 'w');
|
||||||
|
|
||||||
|
|
|
@ -217,9 +217,8 @@ foreach ($raw_array as $sub_array)
|
||||||
// Do JSON encoding before writing result to file
|
// Do JSON encoding before writing result to file
|
||||||
$json = json_encode($roas, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT|JSON_NUMERIC_CHECK);
|
$json = json_encode($roas, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT|JSON_NUMERIC_CHECK);
|
||||||
|
|
||||||
writeRoutinatorExceptionFile();
|
writeRoutinatorExceptionFile($json);
|
||||||
|
|
||||||
// Commit and push to all git remote repositories
|
|
||||||
commitPushToRemotes();
|
commitPushToRemotes();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require ("_define.php");
|
||||||
|
require ("_functions.php");
|
||||||
|
|
||||||
// Before we begin. Ensure registry repository is up-to-date
|
// Before we begin. Ensure registry repository is up-to-date
|
||||||
fetchUpstreamMaster();
|
fetchUpstreamMaster();
|
||||||
checkoutMaster();
|
checkoutMaster();
|
||||||
|
@ -189,8 +192,8 @@ foreach ($raw_array as $sub_array)
|
||||||
// Do JSON encoding before writing result to file
|
// Do JSON encoding before writing result to file
|
||||||
$json = json_encode ($roas, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
|
$json = json_encode ($roas, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
|
||||||
|
|
||||||
writeExportJSON();
|
writeExportJSON($json);
|
||||||
writeBirdConfig();
|
writeBirdConfig($json, $roas);
|
||||||
|
|
||||||
commitPushToRemotes();
|
commitPushToRemotes();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue