From 22f1898b35207a2dea9fdcbcae85de7f54997ae9 Mon Sep 17 00:00:00 2001 From: DancingSnow <1121149616@qq.com> Date: Sat, 18 May 2024 14:43:58 +0800 Subject: [PATCH] fix language filename --- .github/workflows/scripts/build.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/scripts/build.py b/.github/workflows/scripts/build.py index 698d800..e6248cb 100644 --- a/.github/workflows/scripts/build.py +++ b/.github/workflows/scripts/build.py @@ -77,12 +77,13 @@ def main(): 'build/overrides/config/ftbquests/quests/chapters', dirs_exist_ok=True ) - os.makedirs('build/overrides/kubejs/assets/gtep_quests', exist_ok=True) - shutil.copytree( - 'config/ftbquests/localized_quests', - 'build/overrides/kubejs/assets/gtep_quests/lang', - ignore=lambda src, fs: filter(lambda x: not x.endswith('.json'), fs) - ) + os.makedirs('build/overrides/kubejs/assets/gtep_quests/lang', exist_ok=True) + for localized_files in os.listdir('config/ftbquests/localized_quests'): + if localized_files.endswith('.json'): + shutil.copyfile( + 'config/ftbquests/localized_quests/' + localized_files, + 'build/overrides/kubejs/assets/gtep_quests/lang/' + localized_files.lower(), + ) shutil.rmtree('build/overrides/config/ftbquests/localized_quests') print(f'name={manifest["name"]}-{manifest["version"]}')