mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 20:05:58 +08:00
update release script for mac arm
This commit is contained in:
parent
29a9398f28
commit
f0289f3cef
@ -45,6 +45,7 @@ with urlopen("https://api.github.com/repos/"+repo+"/actions/artifacts") as f:
|
|||||||
found_linux_appimage_gtk2 = False;
|
found_linux_appimage_gtk2 = False;
|
||||||
found_linux_appimage_gtk3 = False;
|
found_linux_appimage_gtk3 = False;
|
||||||
found_macos = False;
|
found_macos = False;
|
||||||
|
found_macos_arm = False;
|
||||||
print("there is "+ str(artifacts["total_count"])+ " artifacts in the repo");
|
print("there is "+ str(artifacts["total_count"])+ " artifacts in the repo");
|
||||||
for entry in artifacts["artifacts"]:
|
for entry in artifacts["artifacts"]:
|
||||||
if entry["name"] == "rc_win64" and not found_win:
|
if entry["name"] == "rc_win64" and not found_win:
|
||||||
@ -67,6 +68,14 @@ with urlopen("https://api.github.com/repos/"+repo+"/actions/artifacts") as f:
|
|||||||
z = zipfile.ZipFile(io.BytesIO(resp.content));
|
z = zipfile.ZipFile(io.BytesIO(resp.content));
|
||||||
z.extractall(release_path);
|
z.extractall(release_path);
|
||||||
os.rename(release_path+"/"+program_name+".dmg", release_path+"/"+program_name+"_"+version+"_macos_"+date_str+".dmg");
|
os.rename(release_path+"/"+program_name+".dmg", release_path+"/"+program_name+"_"+version+"_macos_"+date_str+".dmg");
|
||||||
|
if entry["name"] == "rc_arm_macos.dmg" and not found_macos_arm:
|
||||||
|
found_macos_arm = True;
|
||||||
|
print("ask for: "+entry["archive_download_url"]);
|
||||||
|
resp = requests.get(entry["archive_download_url"], headers={'Authorization': 'token ' + github_auth_token,}, allow_redirects=True);
|
||||||
|
print("macos-arm: " +str(resp));
|
||||||
|
z = zipfile.ZipFile(io.BytesIO(resp.content));
|
||||||
|
z.extractall(release_path);
|
||||||
|
os.rename(release_path+"/"+program_name+".dmg", release_path+"/"+program_name+"_"+version+"_macos_arm_"+date_str+".dmg");
|
||||||
if entry["name"] == "rc-"+program_name+"-gtk2.AppImage" and not found_linux_appimage_gtk2:
|
if entry["name"] == "rc-"+program_name+"-gtk2.AppImage" and not found_linux_appimage_gtk2:
|
||||||
found_linux_appimage_gtk2 = True;
|
found_linux_appimage_gtk2 = True;
|
||||||
print("ask for: "+entry["archive_download_url"]);
|
print("ask for: "+entry["archive_download_url"]);
|
||||||
@ -98,3 +107,5 @@ with urlopen("https://api.github.com/repos/"+repo+"/actions/artifacts") as f:
|
|||||||
except:
|
except:
|
||||||
with zipfile.ZipFile(base_path+"_bof.tar.zip", 'w') as myzip:
|
with zipfile.ZipFile(base_path+"_bof.tar.zip", 'w') as myzip:
|
||||||
myzip.write(base_path+".tar");
|
myzip.write(base_path+".tar");
|
||||||
|
|
||||||
|
print("DONT FORGET TO PUSH YOUR MASTER");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user