MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / canUploadApk

Function canUploadApk

main.js:635–649  ·  view source on GitHub ↗
(sdkVariant, abiVariant, versionCode, platforms)

Source from the content-addressed store, hash-verified

633}
634
635async function canUploadApk (sdkVariant, abiVariant, versionCode, platforms) {
636 const type = sdkVariant !== 'latest' ? abiVariant + ucfirst(sdkVariant) : abiVariant;
637 for (let i = 0; i < platforms.length; i++) {
638 const platform = platforms[i];
639 const isDefault = platform === 'googlePlay';
640 const max = type === 'universal' ? await getObject('apk', isDefault ? 'max' : platform + '-max') : null;
641 const id = isDefault ? type : platform + '-' + type;
642 const cur = await getObject('apk', id);
643 const maxVersion = Math.max(cur ? cur.versionCode : 0, type === 'universal' && platform === 'googlePlay' && max ? max.versionCode : 0);
644 if (versionCode <= maxVersion) {
645 return false;
646 }
647 }
648 return true;
649}
650
651async function traceDuration (type, name, startTime, endTime, isComplete) {
652 if (typeof endTime !== 'number')

Callers 1

prepareForPublishingFunction · 0.85

Calls 2

ucfirstFunction · 0.85
getObjectFunction · 0.85

Tested by

no test coverage detected