From 4a7ef0b995f79f7e394b717e5b3cdc95cab71caa Mon Sep 17 00:00:00 2001 From: bruceOrange22 Date: Fri, 14 Mar 2025 11:12:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=A7=A3=E5=86=B3=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E7=BC=96=E8=AF=91=EF=BC=8C=E6=8A=A5=E9=94=99=EF=BC=8C?= =?UTF-8?q?=E6=89=BE=E4=B8=8D=E5=88=B0release=E8=B7=AF=E5=BE=84=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#342)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 解决第一次编译,报错,找不到release路径的问题 * Update release.py --------- Co-authored-by: guoxianwei Co-authored-by: Xiaoxia --- scripts/release.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/release.py b/scripts/release.py index 49304600..b15164f2 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -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")