Skip to content

Commit

Permalink
Update build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
IamEld3st authored Apr 7, 2020
1 parent 7c356eb commit 9c6f59b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@
if not os.path.exists('./dist/'):
os.mkdir('./dist/')

build = PyZipFile(
f"./dist/node-rlbot-{latest_lts['version']}-{latest_lts['lts']}.zip")
build.writepy('./build/')
with ZipFile(f"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)
# Add file to zip
zipObj.write(filePath)

shutil.rmtree('./build/')

0 comments on commit 9c6f59b

Please sign in to comment.