forked from xiaozhi/xiaozhi-esp32
feat:解决第一次编译,报错,找不到release路径的问题 (#342)
* 解决第一次编译,报错,找不到release路径的问题 * Update release.py --------- Co-authored-by: guoxianwei <xianwei.guo@orioniot.cn> Co-authored-by: Xiaoxia <terrence@tenclass.com>
This commit is contained in:
@@ -31,10 +31,12 @@ def merge_bin():
|
||||
sys.exit(1)
|
||||
|
||||
def zip_bin(board_type, project_version):
|
||||
if not os.path.exists("releases"):
|
||||
os.makedirs("releases")
|
||||
output_path = f"releases/v{project_version}_{board_type}.zip"
|
||||
if os.path.exists(output_path):
|
||||
os.remove(output_path)
|
||||
with zipfile.ZipFile(output_path, 'w') as zipf:
|
||||
with zipfile.ZipFile(output_path, 'w', compression=zipfile.ZIP_DEFLATED) as zipf:
|
||||
zipf.write("build/merged-binary.bin", arcname="merged-binary.bin")
|
||||
print(f"zip bin to {output_path} done")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user