Add uniform Yangmi framing candidate for code37
This commit is contained in:
@@ -50,7 +50,7 @@ def build_dir(profile):
|
||||
return ROOT/('app/build' if profile == 'main' else 'app/build/characters/'+profile)
|
||||
|
||||
|
||||
def verify(apk, profile, version, media_bundle='black-correct03'):
|
||||
def verify(apk, profile, version, media_bundle='black-correct03',frame_zoom=1,frame_center_y=.5):
|
||||
catalog = select.catalog()
|
||||
role = catalog['profiles'][profile]
|
||||
media = catalog['mediaBundles'][media_bundle]
|
||||
@@ -101,6 +101,9 @@ def verify(apk, profile, version, media_bundle='black-correct03'):
|
||||
require(dex_values.get(field) == str(value).lower(), 'APK DEX boolean mismatch: '+field)
|
||||
require(dex_values.get('VERSION_CODE') == str(version) and
|
||||
dex_values.get('VERSION_NAME') == '"0.7.14'+role['versionSuffix']+'"', 'APK DEX version mismatch')
|
||||
for field,value in [('AVATAR_FRAME_ZOOM',frame_zoom),('AVATAR_FRAME_CENTER_Y',frame_center_y)]:
|
||||
if field in dex_values or frame_zoom!=1 or frame_center_y!=.5:
|
||||
require(abs(float(dex_values.get(field,'nan'))-value)<.000001,'APK framing mismatch: '+field)
|
||||
badge = subprocess.check_output([str(TOOLS/'aapt'), 'dump', 'badging', str(apk)], text=True)
|
||||
version_name = '0.7.14'+role['versionSuffix']
|
||||
for value in ("name='"+role['applicationId']+"'", f"versionCode='{version}'",
|
||||
@@ -123,6 +126,7 @@ def verify(apk, profile, version, media_bundle='black-correct03'):
|
||||
'index_sha256': media['indexSha256'], 'media_bundle':media_bundle, 'asset_files_verified':len(selected['files']),
|
||||
'assets_unchanged': len(selected['files']) if media_bundle=='black-correct03' else None,
|
||||
'network_actions_allowed':media.get('networkActionsAllowed',False),
|
||||
'framing_zoom':frame_zoom,'framing_center_y':frame_center_y,
|
||||
'poster_resources_unchanged': 2, 'provider_authorities': authorities,
|
||||
'actual_dex_verified': True, 'device': 'not_run', 'gateway_changed': False}
|
||||
|
||||
@@ -132,8 +136,9 @@ def artifact_name(profile, version):
|
||||
return f"lan-voice-v0714-{profile}-code{version}-arm64-debug.apk"
|
||||
|
||||
|
||||
def publish(apk, report):
|
||||
name = artifact_name(report['profile'], report['version_code'])
|
||||
def publish(apk, report, name=None):
|
||||
name = name or artifact_name(report['profile'], report['version_code'])
|
||||
require(re.fullmatch('[a-z0-9.-]+[.]apk',name),'artifact filename shape')
|
||||
artifact = ROOT/'artifacts'/name
|
||||
with artifact.open('xb') as out, apk.open('rb') as src:
|
||||
shutil.copyfileobj(src, out)
|
||||
|
||||
Reference in New Issue
Block a user