Difficult-Rocket/.github/workflows/post_compile.py

34 lines
774 B
Python
Raw Normal View History

2022-12-29 11:15:00 +08:00
# -------------------------------
# Difficult Rocket
2023-01-20 14:08:12 +08:00
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
2022-12-29 11:15:00 +08:00
# All rights reserved
# -------------------------------
import os
import sys
2022-12-29 12:08:08 +08:00
import zipfile
if sys.platform == "win32":
os.system('')
2022-12-29 12:08:08 +08:00
2023-01-22 09:19:13 +08:00
def make_zip():
with zipfile.ZipFile('./build/main.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
for path, sub_paths, sub_files in os.walk('./build/Difficult-Rocket'):
print(f'writing {path}')
for file in sub_files:
file_path = os.path.join(path, file)
dist_zip.write(file_path)
2022-12-29 12:08:08 +08:00
2023-01-22 09:19:13 +08:00
def remove_dev_usage():
2023-01-22 17:21:21 +08:00
un_use_fonts = [
'./'
]
2023-01-22 09:19:13 +08:00
...
if __name__ == '__main__':
print(os.listdir('./build'))
make_zip()