From b6f5abb3382696ae2b9611ce2a3c17a7f2a8ce82 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Fri, 4 Oct 2024 09:11:36 +0800 Subject: [PATCH] =?UTF-8?q?command=5Flist=E5=88=86=E6=94=AF=E7=AE=80?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 9 +++------ ui/src/pages/Update.vue | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) 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' }, {