POC of system.php routine

This commit is contained in:
Matt Pass
2019-10-06 12:27:55 +01:00
committed by GitHub
parent a03cf9ea43
commit 158ab19268

9
processes/system.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
// include("headers.php");
// include("settings.php");
$gitData = shell_exec("{ git diff --name-only --staged ; git ls-files --other --modified --exclude-standard ;} | sort | uniq");
$diffLines = explode("\n", $gitData);
$output = ["paths" => array_filter($diffLines)];
// Store the serialized array in PHP comment block for pick up
file_put_contents($docRoot.$ICEcoderDir."/data/git-diff.php", "<?php\n/\n\n".serialize($output)."\n\n/\n?".">");
?>