From ac180e36f87dd351658283196dd80f9499278567 Mon Sep 17 00:00:00 2001 From: IamEld3st Date: Tue, 7 Apr 2020 18:05:24 +0200 Subject: [PATCH] Update build.py --- build.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/build.py b/build.py index 863bb0c..4e11d82 100644 --- a/build.py +++ b/build.py @@ -37,15 +37,7 @@ if not os.path.exists('./dist/'): os.mkdir('./dist/') -with ZipFile(f"./dist/node-rlbot-{latest_lts['version']}-{latest_lts['lts']}.zip", 'w') as zipObj: - # Iterate over all the files in directory - for folderName, subfolders, filenames in os.walk('./build/'): - for filename in filenames: - # create complete filepath of file in directory - filePath = os.path.join(folderName, filename) - path = Path(filePath) - - # Add file to zip - zipObj.write(path, Path(*path.parts[2:])) +shutil.make_archive( + f"./dist/node-rlbot-{latest_lts['version']}-{latest_lts['lts']}.zip", 'zip', './build/') shutil.rmtree('./build/')