diff options
author | supermerill <merill@free.fr> | 2021-10-28 00:49:46 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2021-10-28 00:49:46 +0300 |
commit | 402995abbeff32cfb8ad38d40761ac41e72fe0a1 (patch) | |
tree | 464a7eebce57bf78304d4e814eb46b7ca4643df0 /create_release.py | |
parent | 15235f2a4ef790e88cda22c102a3ef4a91b378e1 (diff) | |
parent | af5c3f13ba601b174f0fa8758b349e77e3778bbc (diff) |
Merge branch 'dev'
Diffstat (limited to 'create_release.py')
-rw-r--r-- | create_release.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/create_release.py b/create_release.py index 53bb7d8e6..df1cd373a 100644 --- a/create_release.py +++ b/create_release.py @@ -42,7 +42,8 @@ with urlopen("https://api.github.com/repos/"+repo+"/actions/artifacts") as f: artifacts = json.loads(f.read().decode('utf-8')); found_win = False; found_linux = False; - found_linux_appimage = False; + found_linux_appimage_gtk2 = False; + found_linux_appimage_gtk3 = False; found_macos = False; print("there is "+ str(artifacts["total_count"])+ " artifacts in the repo"); for entry in artifacts["artifacts"]: @@ -66,19 +67,23 @@ with urlopen("https://api.github.com/repos/"+repo+"/actions/artifacts") as f: z = zipfile.ZipFile(io.BytesIO(resp.content)); z.extractall(release_path); os.rename(release_path+"/"+program_name+".dmg", release_path+"/"+program_name+"_"+version+"_macos_"+date_str+".dmg"); - if entry["name"] == "rc-"+program_name+"-AppImage.tar" and not found_linux_appimage: - found_linux_appimage = True; + if entry["name"] == "rc-"+program_name+"-gtk2.AppImage" and not found_linux_appimage_gtk2: + found_linux_appimage_gtk2 = 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("appimage: " +str(resp)); + z = zipfile.ZipFile(io.BytesIO(resp.content)); + z.extractall(release_path); + os.rename(release_path+"/"+program_name+"_ubu64.AppImage", release_path+"/"+program_name+"-ubuntu_18.04-gtk2-" + version + ".AppImage"); + if entry["name"] == "rc-"+program_name+"-gtk3.AppImage" and not found_linux_appimage_gtk3: + found_linux_appimage_gtk3 = 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("appimage: " +str(resp)); z = zipfile.ZipFile(io.BytesIO(resp.content)); z.extractall(release_path); - my_tar = tarfile.open(release_path+"/"+program_name+"_ubu64.AppImage.tar"); - my_tar.extractall(release_path); - my_tar.close(); - os.remove(release_path+"/"+program_name+"_ubu64.AppImage.tar"); os.rename(release_path+"/"+program_name+"_ubu64.AppImage", release_path+"/"+program_name+"-ubuntu_18.04-" + version + ".AppImage"); - if entry["name"] == "rc_linux.tar" and not found_linux: + if entry["name"] == "rc_linux_gtk3.tar" and not found_linux: found_linux = True; print("ask for: "+entry["archive_download_url"]); resp = requests.get(entry["archive_download_url"], headers={'Authorization': 'token ' + github_auth_token,}, allow_redirects=True); |