Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $repo_dir = '/var/www/git/_ku1bo__c_plus_z_.git';
- $web_root_dir = '/var/www/html/kobuplus.com/public_html';
- $git_path = '/usr/bin/git';
- exec("cd $repo_dir" && "$git_path fetch");
- exec("cd $repo_dir" && "GIT_WORK_TREE=$web_root_dir $git_path checkout -f");
- file_put_contents("deploy.log", date("m/d/Y h:i:s a") . "deployed latest branch" . "n", FILE_APPEND);
- ?>
Add Comment
Please, Sign In to add comment