chore: 将工作流脚本移动到res/scripts

This commit is contained in:
Rock Chin 2023-04-06 10:08:15 +08:00
parent fb40af81ac
commit 0817c3f148
4 changed files with 11 additions and 3 deletions

View File

@ -27,7 +27,11 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade yiri-mirai openai colorlog func_timeout dulwich Pillow
- name: Copy Scripts
run: |
cp res/scripts/generate_cmdpriv_template.py .
- name: Generate Files
run: |
python main.py

View File

@ -31,6 +31,10 @@ jobs:
python -m pip install --upgrade pip
# 在此处添加您的项目所需的其他依赖
- name: Copy Scripts
run: |
cp res/scripts/generate_override_all.py .
- name: Run generate_override_all.py
run: python3 generate_override_all.py

View File

@ -13,5 +13,5 @@ for key in cmdsmgr.__command_list__:
template[key] = cmdsmgr.__command_list__[key]['privilege']
# 写入cmdpriv-template.json
with open('cmdpriv-template.json', 'w') as f:
with open('../../cmdpriv-template.json', 'w') as f:
f.write(json.dumps(template, indent=4, ensure_ascii=False))

View File

@ -19,5 +19,5 @@ for k, v in template.__dict__.items():
print(k, v, type(v))
output_json[k] = v
with open("override-all.json", "w", encoding="utf-8") as f:
with open("../../override-all.json", "w", encoding="utf-8") as f:
json.dump(output_json, f, indent=4, ensure_ascii=False)