From 926985563a68ef157ada731fd5c190b34cd0dd85 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Fri, 6 Jan 2023 21:36:06 +0800 Subject: [PATCH] fix: config --- .github/workflows/get_info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/get_info.py b/.github/workflows/get_info.py index 523d04f..161fd4e 100644 --- a/.github/workflows/get_info.py +++ b/.github/workflows/get_info.py @@ -12,7 +12,7 @@ sys.path.append(os.path.abspath(os.curdir)) from Difficult_Rocket import DR_runtime -args = ['-env', ''] +args = ['-env', '-github-dev'] if not any([x in sys.argv for x in args]): # 没有输入参数,直接输出默认信息并输出 print(sys.version) @@ -23,14 +23,14 @@ if not any([x in sys.argv for x in args]): # 没有输入参数,直接输出 config_file['window']['height'] = 768 rtoml.dump(config_file, open('./configs/main.toml', 'w')) -if os.path.abspath(os.curdir) in sys.path and '-env' in sys.argv: +if os.path.abspath(os.curdir) in sys.path and sys.argv == '-env': with open('./.github/workflows/env.ps1', encoding='utf-8', mode='w') as env_file: print(f'$env:DR_version = "{DR_runtime.DR_version}"', file=env_file) print(f'$env:DR_language = "{DR_runtime.language}"', file=env_file) print(f'$env:DR_long_version = "{DR_runtime.DR_long_version}"', file=env_file) print(f'$env:Build_version = "{DR_runtime.Build_version}"', file=env_file) -if os.path.abspath(os.curdir) in sys.path and '-github-env' in sys.argv: +elif os.path.abspath(os.curdir) in sys.path and sys.argv == '-github-env': print(f'DR_version={DR_runtime.DR_version}') print(f'DR_language={DR_runtime.language}')