Example #1
0
 /**
  * 推送git
  */
 public function actionPushGit()
 {
     $markdown = sprintf("%s/%s", rtrim(dirname(__FILE__), '/'), static::MARKDOWN_ROOT);
     $ret = Command::gitPush($markdown);
     echo $ret ? '推送成功:)' : '推送失败:(';
 }
Example #2
0
 /**
  * 推送git
  */
 public function actionPushGit()
 {
     if (empty($this->_config['git'])) {
         throw new Exception('请先在Config.php中配置文档保存到的git ssh地址:)');
     }
     try {
         $git = new Command();
         $ret = $git->gitPush();
         echo $ret ? '推送成功:)' : '推送失败:(';
     } catch (Exception $e) {
         echo $e->getMessage();
     }
 }