тест 4 обработчика гитлаба
This commit is contained in:
parent
f72849f55f
commit
d51dbc3c45
@ -12,7 +12,7 @@
|
||||
if ($hash !== $signature)
|
||||
{
|
||||
error_log('FAILED - payload signature mismatch');
|
||||
exit();
|
||||
exit("wrong signature");
|
||||
}
|
||||
|
||||
$json = json_decode($payload, true);
|
||||
@ -21,11 +21,13 @@
|
||||
if (json_last_error() !== JSON_ERROR_NONE)
|
||||
{
|
||||
error_log('FAILED - json decode - '. json_last_error());
|
||||
exit();
|
||||
exit(json_last_error());
|
||||
}
|
||||
|
||||
if(strcmp($json['object_kind'], 'push') == 0)
|
||||
{
|
||||
$result = shell_exec("cd /var/www/lk && git reset --hard HEAD && git pull");
|
||||
file_put_contents("/var/www/lk/storage/logs/temp_exec", print_r($result, 1));
|
||||
}
|
||||
echo "<p>$result</p>";
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user