command_list分支简化
This commit is contained in:
parent
afe5070165
commit
b6f5abb338
2 changed files with 4 additions and 7 deletions
9
main.py
9
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",
|
||||
|
|
|
@ -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'
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue