Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added rollback code that adds to version f

  • Loading branch information...
commit 2628eaa6a32d54ea24003438c16715f663a80f95 1 parent 3873249
@liamr authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 application/controllers/deployment.php
View
10 application/controllers/deployment.php
@@ -55,6 +55,16 @@ function post_receive(){
}
function rollback(){
+
+ log_message('debug', 'DEPLOYMENT: rollback to previous version - '. ENVIRONMENT);
+
+ //Write commit info to
+
+ $this->load->helper('file');
+
+ $data = 'SITE WAS ROLLED BACK TO PREVIOUS VERSION<br />';
+
+ write_file('./app_version', $data, 'a');
shell_exec('/usr/bin/git --git-dir="' . ENVIRONMENT_BASE . '.git" --work-tree="' . ENVIRONMENT_BASE . '" reset --hard HEAD~1');
//shell_exec('/usr/bin/git --git-dir="' . ENVIRONMENT_BASE . '.git" --work-tree="' . ENVIRONMENT_BASE . '" clean -f');
Please sign in to comment.
Something went wrong with that request. Please try again.