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/')