/**
* upgrade walle 更新walle版本
*
* @throws yii\console\Exception
*/
public function actionUpgrade()
{
$commander = new Command(['console']);
// stash save local change 暂存本地修改
echo 'stash save local change 暂存本地修改: git stash save ...', PHP_EOL;
$commander->runLocalCommand('/usr/bin/env git stash save');
// pull code 更新代码
echo 'pull code 更新代码: git pull ...', PHP_EOL;
$commander->runLocalCommand('/usr/bin/env git pull');
// stash pop local change 弹出暂存本地修改
echo 'stash pop local change 弹出暂存本地修改: git stash pop ...', PHP_EOL;
$commander->runLocalCommand('/usr/bin/env git stash pop');
// init walle 初始化项目
$this->runAction('setup', ['interactive' => $this->interactive]);
// checkout the current version查看最新版本
echo "[32m\n--------------------------------------------------------", PHP_EOL;
echo "Congratulations To Upgrade. Your Walle Current Version:[0m", PHP_EOL;
$this->runAction('index', ['interactive' => $this->interactive]);
}