mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
Merge branch 'main' of https://github.com/jay0lee/GAM into main
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -108,7 +108,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/python
|
~/python
|
||||||
~/ssl
|
~/ssl
|
||||||
key: ${{ matrix.os }}-${{ matrix.jid }}-20210325
|
key: ${{ matrix.os }}-${{ matrix.jid }}-20210407
|
||||||
|
|
||||||
- name: Set env variables
|
- name: Set env variables
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ CHROME_PLATFORM_CHOICE_MAP = {
|
|||||||
'linux': 'linux',
|
'linux': 'linux',
|
||||||
'mac': 'mac',
|
'mac': 'mac',
|
||||||
'macarm64': 'mac_arm64',
|
'macarm64': 'mac_arm64',
|
||||||
'sebview': 'webview',
|
'webview': 'webview',
|
||||||
'win': 'win',
|
'win': 'win',
|
||||||
'win64': 'win64',
|
'win64': 'win64',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"""Chrome Browser Cloud Management API calls"""
|
"""Chrome Browser Cloud Management API calls"""
|
||||||
|
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import googleapiclient.errors
|
import googleapiclient.errors
|
||||||
@@ -301,9 +302,20 @@ def update_policy():
|
|||||||
value = value.split(',')
|
value = value.split(',')
|
||||||
if myarg == 'chrome.users.chromebrowserupdates' and \
|
if myarg == 'chrome.users.chromebrowserupdates' and \
|
||||||
cased_field == 'targetVersionPrefixSetting':
|
cased_field == 'targetVersionPrefixSetting':
|
||||||
if value.find('-') != -1:
|
mg = re.compile(r'^([a-z]+)-(\d+)$').match(value)
|
||||||
channel, minus = value.split('-')
|
if mg:
|
||||||
milestone = gapi_chromehistory.get_relative_milestone(channel, int(minus))
|
channel = mg.group(1).lower().replace('_', '')
|
||||||
|
minus = mg.group(2)
|
||||||
|
if channel not in gapi_chromehistory.CHROME_CHANNEL_CHOICE_MAP:
|
||||||
|
expected_channels = ', '.join(gapi_chromehistory.CHROME_CHANNEL_CHOICE_MAP)
|
||||||
|
msg = f'Expected {myarg} {cased_field} channel to be one of ' \
|
||||||
|
f'{expected_channels}, got {channel}'
|
||||||
|
controlflow.system_error_exit(8, msg)
|
||||||
|
milestone = gapi_chromehistory.get_relative_milestone(
|
||||||
|
gapi_chromehistory.CHROME_CHANNEL_CHOICE_MAP[channel], int(minus))
|
||||||
|
if not milestone:
|
||||||
|
msg = f'{myarg} {cased_field} channel {channel} offset {minus} does not exist'
|
||||||
|
controlflow.system_error_exit(8, msg)
|
||||||
value = f'{milestone}.'
|
value = f'{milestone}.'
|
||||||
body['requests'][-1]['policyValue']['value'][cased_field] = value
|
body['requests'][-1]['policyValue']['value'][cased_field] = value
|
||||||
body['requests'][-1]['updateMask'] += f'{cased_field},'
|
body['requests'][-1]['updateMask'] += f'{cased_field},'
|
||||||
|
|||||||
Reference in New Issue
Block a user