Advertisement
Guest User

Untitled

a guest
May 26th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. public function actionPull($id)
  2.     {
  3.         $model = $this->loadModel($id);
  4.  
  5.         Yii::import('application.vendor.*');
  6.         require_once('easy-git-deploy/bootstrap.php');
  7.  
  8.         $user = Yii::app()->session['username'];
  9.         $password = Yii::app()->session['password'];
  10.         $folder = $model->folder;
  11.         $name = $model->name;
  12.        
  13.         $config = array(
  14.          'directory' => '../projects/'.$folder,
  15.          'url' => 'https://'.$user.':'.$password.'@bitbucket.org/redpandapl/'.$name.'.git'
  16.         );
  17.  
  18.         $pull = new Pull($config);
  19.         $pull->execute();
  20.         echo $pull->_log_messages;
  21.  
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement