Merge pull request #132606 from primeos/chromiumDev

chromiumDev: 93.0.4577.18 -> 94.0.4595.0

authored by

Michael Weiss and committed by
GitHub
c9f8846d f0fda3bf

+50 -23
+44 -17
pkgs/applications/networking/browsers/chromium/update.py
··· 3 3 4 4 """This script automatically updates chromium, google-chrome, chromedriver, and ungoogled-chromium 5 5 via upstream-info.json.""" 6 + # Usage: ./update.py [--commit] 6 7 7 8 import csv 8 9 import json ··· 22 23 BUCKET_URL = 'https://commondatastorage.googleapis.com/chromium-browser-official' 23 24 24 25 JSON_PATH = dirname(abspath(__file__)) + '/upstream-info.json' 26 + COMMIT_MESSAGE_SCRIPT = dirname(abspath(__file__)) + '/get-commit-message.py' 25 27 26 28 27 29 def load_json(path): ··· 117 119 sys.exit(1) 118 120 119 121 122 + def get_channel_key(item): 123 + """Orders Chromium channels by their name.""" 124 + channel_name = item[0] 125 + if channel_name == 'stable': 126 + return 0 127 + if channel_name == 'beta': 128 + return 1 129 + if channel_name == 'dev': 130 + return 2 131 + if channel_name == 'ungoogled-chromium': 132 + return 3 133 + print(f'Error: Unexpected channel: {channel_name}', file=sys.stderr) 134 + sys.exit(1) 135 + 136 + 120 137 def print_updates(channels_old, channels_new): 121 138 """Print a summary of the updates.""" 122 139 print('Updates:') ··· 192 209 channels[channel_name] = channel 193 210 194 211 195 - with open(JSON_PATH, 'w') as out: 196 - def get_channel_key(item): 197 - """Orders Chromium channels by their name.""" 198 - channel_name = item[0] 199 - if channel_name == 'stable': 200 - return 0 201 - if channel_name == 'beta': 202 - return 1 203 - if channel_name == 'dev': 204 - return 2 205 - if channel_name == 'ungoogled-chromium': 206 - return 3 207 - print(f'Error: Unexpected channel: {channel_name}', file=sys.stderr) 208 - sys.exit(1) 209 - sorted_channels = OrderedDict(sorted(channels.items(), key=get_channel_key)) 210 - json.dump(sorted_channels, out, indent=2) 211 - out.write('\n') 212 + sorted_channels = OrderedDict(sorted(channels.items(), key=get_channel_key)) 213 + if len(sys.argv) == 2 and sys.argv[1] == '--commit': 214 + for channel_name in sorted_channels.keys(): 215 + version_old = last_channels[channel_name]['version'] 216 + version_new = sorted_channels[channel_name]['version'] 217 + if LooseVersion(version_old) < LooseVersion(version_new): 218 + last_channels[channel_name] = sorted_channels[channel_name] 219 + with open(JSON_PATH, 'w') as out: 220 + json.dump(last_channels, out, indent=2) 221 + out.write('\n') 222 + attr_name = channel_name_to_attr_name(channel_name) 223 + commit_message = f'{attr_name}: {version_old} -> {version_new}' 224 + if channel_name == 'stable': 225 + body = subprocess.check_output([COMMIT_MESSAGE_SCRIPT]).decode('utf-8') 226 + prefix = f'chromium: TODO -> {version_new}' 227 + if not body.startswith(prefix): 228 + print("Error: Couldn't fetch the the release notes for the following update:") 229 + print(commit_message) 230 + sys.exit(1) 231 + body = body.removeprefix(prefix) 232 + commit_message += body 233 + subprocess.run(['git', 'add', JSON_PATH], check=True) 234 + subprocess.run(['git', 'commit', '--file=-'], input=commit_message.encode(), check=True) 235 + else: 236 + with open(JSON_PATH, 'w') as out: 237 + json.dump(sorted_channels, out, indent=2) 238 + out.write('\n') 212 239 print_updates(last_channels, sorted_channels)
+6 -6
pkgs/applications/networking/browsers/chromium/upstream-info.json
··· 31 31 } 32 32 }, 33 33 "dev": { 34 - "version": "93.0.4577.18", 35 - "sha256": "1h1ppyizj5vbnrv11iy9vlcpcv8mgb9r8m2zmz6vp7q1ch6w0w4x", 36 - "sha256bin64": "14cw0k4gsilybg7gbbbmck62i0prq5rm6hwqalmmmiqcldrw05mq", 34 + "version": "94.0.4595.0", 35 + "sha256": "0ksd7vqpbiplbg2xpm566z7p7qp57r27a3pk6ss1qz8v18490092", 36 + "sha256bin64": "1kibyhgwcgby3hnhjdg2vrgbj4dvvbicqlcj4id9761zw1jhz8r4", 37 37 "deps": { 38 38 "gn": { 39 - "version": "2021-07-08", 39 + "version": "2021-07-31", 40 40 "url": "https://gn.googlesource.com/gn", 41 - "rev": "24e2f7df92641de0351a96096fb2c490b2436bb8", 42 - "sha256": "1lwkyhfhw0zd7daqz466n7x5cddf0danr799h4jg3s0yvd4galjl" 41 + "rev": "eea3906f0e2a8d3622080127d2005ff214d51383", 42 + "sha256": "1wc969jrivb502c45wdcbgh0c5888nqxla05is9bimkrk9rqppw3" 43 43 } 44 44 } 45 45 },