diff --git a/docroot/git/push.php b/docroot/git/push.php index 113042d..65e6a63 100755 --- a/docroot/git/push.php +++ b/docroot/git/push.php @@ -4,13 +4,12 @@ * Update Website When Code Is Pushed * */ +if (isset ( $_POST ['payload'] )) { + $pData = json_decode ( $_POST ['payload'] ); -if (isset($_POST['payload'])) { - $pData = json_decode($_POST['payload']); + system ( "echo 'Message: " . $pData->head_commit->message . "' >> /tmp/post.log" ); - system("echo 'Message: " . $pData->head_commit->message . "' >> /tmp/post.log"); - - if (strpos($pData->head_commit->message, "PW") == 0) + if (strpos ( $pData->head_commit->message, "PW" ) == 0) system ( "cd /usr/web/sites/app.zirror.com/;git pull" ); }