Update php/upload.php
Deploy / Deploy (push) Successful in 12s
Details
Deploy / Deploy (push) Successful in 12s
Details
This commit is contained in:
parent
9170334fe4
commit
7eddb2b5f0
|
@ -76,10 +76,14 @@
|
|||
}
|
||||
|
||||
function push_to_git() {
|
||||
$git_cmd = 'git --git-dir=/var/www/src/aliceclass';
|
||||
shell_exec($git_cmd . ' add /var/www/src/aliceclass/_data/aulas.json');
|
||||
shell_exec($git_cmd . ' commit -m "update data"');
|
||||
shell_exec($git_cmd . ' push');
|
||||
$git_cmd = 'cd /var/www/src/aliceclass; git ';
|
||||
|
||||
shell_exec($git_cmd . ' config user.name www-data 2>&1');
|
||||
shell_exec($git_cmd . ' config user.email www-data@noreply.alice 2>&1');
|
||||
|
||||
shell_exec($git_cmd . ' add /var/www/src/aliceclass/_data/aulas.json 2>&1');
|
||||
shell_exec($git_cmd . ' commit -m "update data" 2>&1');
|
||||
shell_exec($git_cmd . ' push 2>&1');
|
||||
}
|
||||
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
|
|
Loading…
Reference in New Issue