From 63b056e8bc0f0d353455285b607d1668e05c01cc Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Tue, 15 Oct 2019 22:26:43 +0100 Subject: [PATCH] Get contents of changed files at git head --- processes/system.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/processes/system.php b/processes/system.php index bc4c620..11da7e7 100644 --- a/processes/system.php +++ b/processes/system.php @@ -38,6 +38,24 @@ while(true) { $output = ["paths" => array_filter($diffLines)]; // Store the serialized array in PHP comment block for pick up file_put_contents(dirname(__FILE__)."/../data/git-diff.php", ""); + + // Set Git contents + $output = []; + $paths = array_filter($diffLines); + shell_exec("cd .."); + for ($i=0; $i "modified", + "lastHash" => "abc123", + "lastHashContent" => $content + ]; + } + } + } + file_put_contents(dirname(__FILE__)."/../data/git-content.php", ""); } // Set prev MD5 to this one, ready for next time, sleep for 2 secs before loop starts again $prevMD5 = $thisMD5;