···
from urllib.request import urlopen, Request
-
DEFAULT_NIX = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'git/default.nix')
def get_latest_chromium_build():
···
"""Get the current revision of llvmPackages_git."""
with open(DEFAULT_NIX) as f:
-
rev = re.search(r'^ rev = "(.*)";', line)
···
print('Updating default.nix...')
with fileinput.FileInput(DEFAULT_NIX, inplace=True) as f:
-
if match := re.search(r'^ rev-version = "unstable-(.+)";', line):
old_date = match.group(1)
-
result = re.sub(r'^ version = ".+";', f' version = "{release_version}";', line)
-
result = re.sub(r'^ rev = ".*";', f' rev = "{commit["sha"]}";', result)
-
result = re.sub(r'^ rev-version = ".+";', f' rev-version = "{version}";', result)
-
result = re.sub(r'^ sha256 = ".+";', f' sha256 = "{hash}";', result)
commit_message = f"llvmPackages_git: {old_date} -> {date}"
···
from urllib.request import urlopen, Request
+
DEFAULT_NIX = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'default.nix')
def get_latest_chromium_build():
···
"""Get the current revision of llvmPackages_git."""
with open(DEFAULT_NIX) as f:
+
rev = re.search(r'^ rev = "(.*)";', line)
···
print('Updating default.nix...')
with fileinput.FileInput(DEFAULT_NIX, inplace=True) as f:
+
if match := re.search(r'^ rev-version = "unstable-(.+)";', line):
old_date = match.group(1)
+
result = re.sub(r'^ version = ".+";', f' version = "{release_version}";', result)
+
result = re.sub(r'^ rev = ".*";', f' rev = "{commit["sha"]}";', result)
+
result = re.sub(r'^ rev-version = ".+";', f' rev-version = "{version}";', result)
+
result = re.sub(r'^ sha256 = ".+";', f' sha256 = "{hash}";', result)
commit_message = f"llvmPackages_git: {old_date} -> {date}"