diff --git a/main.py b/main.py index acd0a88..05b3d74 100644 --- a/main.py +++ b/main.py @@ -26,12 +26,9 @@ command_list = { "lfs": "git\\bin\\git lfs install", "ensurepip": "python\\python -m ensurepip --default-pip", "clone": "git\\bin\\git clone https://git.zhaozuohong.vip/mower-ng/mower-ng.git --branch slow", - "fetch_fast": "..\\git\\bin\\git fetch origin fast", - "fetch_slow": "..\\git\\bin\\git fetch origin slow", - "switch_fast": "..\\git\\bin\\git switch -f fast", - "switch_slow": "..\\git\\bin\\git switch -f slow", - "reset_fast": "..\\git\\bin\\git reset --hard origin/fast", - "reset_slow": "..\\git\\bin\\git reset --hard origin/slow", + "fetch": f"..\\git\\bin\\git fetch origin {config['branch']}", + "switch": f"..\\git\\bin\\git switch -f {config['branch']}", + "reset": f"..\\git\\bin\\git reset --hard origin/{config['branch']}", "pip_install": "..\\python\\Scripts\\pip install --no-cache-dir -i https://mirror.sjtu.edu.cn/pypi/web/simple -r requirements.txt --no-warn-script-location", "webview": "start ..\\python\\pythonw webview_ui.py", "manager": "start ..\\python\\pythonw manager.py", diff --git a/ui/src/pages/Update.vue b/ui/src/pages/Update.vue index 53f4945..7492097 100644 --- a/ui/src/pages/Update.vue +++ b/ui/src/pages/Update.vue @@ -14,7 +14,7 @@ watch(branch, () => { const steps = computed(() => [ { title: '更新源码', - command: [`fetch_${branch.value}`, `switch_${branch.value}`, `reset_${branch.value}`], + command: ['fetch', 'switch', 'reset'], cwd: 'mower-ng' }, {