command_list分支简化

This commit is contained in:
zhbaor 2024-10-04 09:11:36 +08:00
parent afe5070165
commit b6f5abb338
2 changed files with 4 additions and 7 deletions

View file

@ -26,12 +26,9 @@ command_list = {
"lfs": "git\\bin\\git lfs install", "lfs": "git\\bin\\git lfs install",
"ensurepip": "python\\python -m ensurepip --default-pip", "ensurepip": "python\\python -m ensurepip --default-pip",
"clone": "git\\bin\\git clone https://git.zhaozuohong.vip/mower-ng/mower-ng.git --branch slow", "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": f"..\\git\\bin\\git fetch origin {config['branch']}",
"fetch_slow": "..\\git\\bin\\git fetch origin slow", "switch": f"..\\git\\bin\\git switch -f {config['branch']}",
"switch_fast": "..\\git\\bin\\git switch -f fast", "reset": f"..\\git\\bin\\git reset --hard origin/{config['branch']}",
"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",
"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", "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", "webview": "start ..\\python\\pythonw webview_ui.py",
"manager": "start ..\\python\\pythonw manager.py", "manager": "start ..\\python\\pythonw manager.py",

View file

@ -14,7 +14,7 @@ watch(branch, () => {
const steps = computed(() => [ const steps = computed(() => [
{ {
title: '更新源码', title: '更新源码',
command: [`fetch_${branch.value}`, `switch_${branch.value}`, `reset_${branch.value}`], command: ['fetch', 'switch', 'reset'],
cwd: 'mower-ng' cwd: 'mower-ng'
}, },
{ {