MCPcopy Index your code
hub / github.com/TGX-Android/Publisher / traceMaxApkVersionCode

Function traceMaxApkVersionCode

main.js:620–633  ·  view source on GitHub ↗
(sdkVariant, abiVariant, versionCode, uploadDate, platform)

Source from the content-addressed store, hash-verified

618}
619
620async function traceMaxApkVersionCode (sdkVariant, abiVariant, versionCode, uploadDate, platform) {
621 const type = sdkVariant !== 'latest' ? abiVariant + ucfirst(sdkVariant) : abiVariant;
622 const isDefault = platform === 'googlePlay';
623 const id = isDefault ? type : platform + '-' + type;
624 const maxId = isDefault ? 'max' : platform + '-max';
625 const cur = await getObject('apk', id);
626 const max = await getObject('apk', maxId);
627 if (!max || versionCode > max.versionCode) {
628 await storeObject('apk', {versionCode, uploadDate, platform}, maxId);
629 }
630 if (!cur || versionCode > cur.versionCode) {
631 await storeObject('apk', {versionCode, uploadDate, platform}, id);
632 }
633}
634
635async function canUploadApk (sdkVariant, abiVariant, versionCode, platforms) {
636 const type = sdkVariant !== 'latest' ? abiVariant + ucfirst(sdkVariant) : abiVariant;

Callers 3

uploadToGooglePlayFunction · 0.85
uploadToHuaweiAppGalleryFunction · 0.85
uploadToGithubFunction · 0.85

Calls 3

ucfirstFunction · 0.85
getObjectFunction · 0.85
storeObjectFunction · 0.85

Tested by

no test coverage detected