浏览代码

refactor: move composer related commands to update.sh

Cat 3 年之前
父节点
当前提交
2540385d88
共有 2 个文件被更改,包括 3 次插入10 次删除
  1. 0 9
      src/Command/Update.php
  2. 3 1
      update.sh

+ 0 - 9
src/Command/Update.php

@@ -81,14 +81,5 @@ final class Update extends Command
 
         file_put_contents(BASE_PATH . '/config/.config.php', $config_new);
         echo PHP_EOL . '迁移完成' . PHP_EOL;
-
-        echo PHP_EOL;
-
-        echo '开始升级composer依赖...' . PHP_EOL;
-        system('php ' . BASE_PATH . '/composer.phar selfupdate');
-        system('php ' . BASE_PATH . '/composer.phar install -d ' . BASE_PATH);
-        echo '升级composer依赖结束,请自行根据上方输出确认是否升级成功' . PHP_EOL;
-        system('rm -rf ' . BASE_PATH . '/storage/framework/smarty/compile/*');
-        system('chown -R ' . $_ENV['php_user_group'] . ' ' . BASE_PATH . '/storage');
     }
 }

+ 3 - 1
upgrade.sh → update.sh

@@ -6,7 +6,9 @@ do_upgrade_sspanel(){
     git fetch --all
     git reset --hard origin/dev
     git pull
-    php composer.phar u
+    rm -r storage/framework/smarty/compile/*
+    php composer.phar update
+    php composer.phar selfupdate
     php vendor/bin/phinx migrate
     php xcat Update
     php xcat Tool importAllSettings