0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 22:22:59 +03:00

Merge pull request #105 from byBenPuls/master

This commit is contained in:
Andrey Onischenko 2024-08-30 12:04:15 +03:00 committed by GitHub
commit 8d7a26f3f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 8 deletions

View File

@ -1,5 +1,5 @@
import sys
import json
import sys
if len(sys.argv) < 3:
print("Usage: python extract_release_notes.py <file_name>")
@ -8,6 +8,7 @@ if len(sys.argv) < 3:
file_name = sys.argv[1]
save_file_name = sys.argv[2]
def build_html(data, first_launch=False):
html = ""
for i, element in enumerate(data):
@ -23,6 +24,7 @@ def build_html(data, first_launch=False):
html += f"<{element['value']}>{build_html(element['children'])}</{element['value']}>"
return html
with open(file_name, "r", encoding='utf-8') as file:
translation = json.load(file)

View File

@ -3,12 +3,14 @@ import os
import shutil
import subprocess
def check_dependency(dependency):
if shutil.which(dependency):
return True
print(f"{dependency} not installed.")
return False
script_dir = os.path.dirname(os.path.realpath(__file__))
# loading versions information from json
@ -16,6 +18,7 @@ version_info_path = os.path.join(script_dir, "version_info.json")
with open(version_info_path, "r") as f:
version_info = json.load(f)
# Arch
def generate_arch():
pkgbuild_template = os.path.join(script_dir, "../templates/PKGBUILD")
@ -44,6 +47,7 @@ def is_nix_version_2_19():
return True
return False
def generate_nix():
nixcmd = "nix --extra-experimental-features nix-command --extra-experimental-features flakes"
flake_path = os.path.join(script_dir, "../flake.nix")

View File

@ -4,6 +4,7 @@ import json
import os
import shutil
import tempfile
import requests
YM_VERSIONS_URL = "https://music-desktop-application.s3.yandex.net/stable/download.json"
@ -13,17 +14,21 @@ ELECTRON_DOWNLOAD_URL = "https://github.com/electron/electron/releases/download/
script_dir = os.path.dirname(os.path.realpath(__file__))
tempdir = tempfile.mkdtemp()
def clear():
shutil.rmtree(tempdir)
atexit.register(clear)
def assert_dependency(dependency):
if shutil.which(dependency):
return
print(f"{dependency} not installed.")
exit(1)
# loading versions json
versions_obj = requests.get(YM_VERSIONS_URL).json()
exe_link = versions_obj["windows"]