Skip to content

Commit

Permalink
Update build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
IamEld3st committed Apr 7, 2020
1 parent 2c04672 commit 02d44b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import os
import shutil
from pathlib import Path
from zipfile import ZipFile, PyZipFile
from io import BytesIO

Expand Down Expand Up @@ -40,6 +41,11 @@
# Iterate over all the files in directory
for folderName, subfolders, filenames in os.walk('./build/'):
for filename in filenames:
zipObj.write(filename)
# 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.rmtree('./build/')

0 comments on commit 02d44b0

Please sign in to comment.