codeplay-common 4.11.10 → 4.11.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/files/finalrelease +27 -10
- package/files/take-screen-image.js +4408 -4382
- package/package.json +1 -1
package/files/finalrelease
CHANGED
|
@@ -1003,6 +1003,10 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
|
|
|
1003
1003
|
// Conditionally set the new file name
|
|
1004
1004
|
let newFileName;
|
|
1005
1005
|
let storeName = storeNames[id];
|
|
1006
|
+
// Amazon previously received version code 10000 for this package.
|
|
1007
|
+
const storeVersionCode = _appPackageId === 'computer.shortcut.keys.app' && String(id) === '7'
|
|
1008
|
+
? String(10000 + Number(finalVersionCode))
|
|
1009
|
+
: finalVersionCode;
|
|
1006
1010
|
|
|
1007
1011
|
|
|
1008
1012
|
if (
|
|
@@ -1020,19 +1024,19 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
|
|
|
1020
1024
|
if (isOnlyOneAPK && ["MiStore","OppoStore","VivoStore"].includes(storeName)) {
|
|
1021
1025
|
|
|
1022
1026
|
newFileName =
|
|
1023
|
-
`${_appUniqueId}_${_appName.replaceAll(" ","_")}-VI_MI_OPPO-b${
|
|
1027
|
+
`${_appUniqueId}_${_appName.replaceAll(" ","_")}-VI_MI_OPPO-b${storeVersionCode}-v${finalVersionName.replace(/\./g,'_')}.aab`;
|
|
1024
1028
|
|
|
1025
1029
|
}
|
|
1026
1030
|
else if (storeName === "SamsungStore") {
|
|
1027
1031
|
|
|
1028
1032
|
newFileName =
|
|
1029
|
-
`${_appUniqueId}_${_appName.replaceAll(" ","_")}-${(storeName.toUpperCase()).replace("STORE","")}-b${
|
|
1033
|
+
`${_appUniqueId}_${_appName.replaceAll(" ","_")}-${(storeName.toUpperCase()).replace("STORE","")}-b${storeVersionCode}-v${finalVersionName.replace(/\./g,'_')}.aab`;
|
|
1030
1034
|
|
|
1031
1035
|
}
|
|
1032
1036
|
else {
|
|
1033
1037
|
|
|
1034
1038
|
newFileName =
|
|
1035
|
-
`${_appUniqueId}_${_appName.replaceAll(" ","_")}-${(storeName.toUpperCase()).replace("STORE","")}-b${
|
|
1039
|
+
`${_appUniqueId}_${_appName.replaceAll(" ","_")}-${(storeName.toUpperCase()).replace("STORE","")}-b${storeVersionCode}-v${finalVersionName}.aab`;
|
|
1036
1040
|
|
|
1037
1041
|
}
|
|
1038
1042
|
|
|
@@ -1152,12 +1156,25 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
|
|
|
1152
1156
|
].filter(Boolean).join(' ');
|
|
1153
1157
|
}
|
|
1154
1158
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1159
|
+
const hasStoreVersionOverride = String(storeVersionCode) !== String(finalVersionCode);
|
|
1160
|
+
try {
|
|
1161
|
+
if (hasStoreVersionOverride) {
|
|
1162
|
+
const storeGradleContent = readFileSync(gradleFilePath, 'utf8');
|
|
1163
|
+
writeFileSync(gradleFilePath, storeGradleContent.replace(/versionCode\s+\d+/, `versionCode ${storeVersionCode}`), 'utf8');
|
|
1164
|
+
console.log(`📦 ${storeName} versionCode: ${storeVersionCode} (base: ${finalVersionCode})`);
|
|
1165
|
+
}
|
|
1166
|
+
if (buildType === "APK") {
|
|
1167
|
+
console.log("📦 Using custom Node signing script for APK build...");
|
|
1168
|
+
execFileSync(process.execPath, [join(process.cwd(), 'buildCodeplay', 'apk-store-builder.js')], { stdio: 'inherit', env: releaseBuildEnv });
|
|
1169
|
+
} else {
|
|
1170
|
+
execSync(`npx cap build android --androidreleasetype=${buildType}`, { stdio: 'inherit', env: releaseBuildEnv });
|
|
1171
|
+
signReleaseBundleWithSha256();
|
|
1172
|
+
}
|
|
1173
|
+
} finally {
|
|
1174
|
+
if (hasStoreVersionOverride) {
|
|
1175
|
+
const storeGradleContent = readFileSync(gradleFilePath, 'utf8');
|
|
1176
|
+
writeFileSync(gradleFilePath, storeGradleContent.replace(/versionCode\s+\d+/, `versionCode ${finalVersionCode}`), 'utf8');
|
|
1177
|
+
}
|
|
1161
1178
|
}
|
|
1162
1179
|
|
|
1163
1180
|
|
|
@@ -1179,7 +1196,7 @@ rl.question('Enter new versionCode (press enter to keep current): ', (newVersion
|
|
|
1179
1196
|
if (existsSync(oldFilePath)) {
|
|
1180
1197
|
renameSync(oldFilePath, checkFullPath);
|
|
1181
1198
|
console.log(`✅ Renamed output ${newExt.toUpperCase()} file to: ${path.basename(checkFullPath)}`);
|
|
1182
|
-
syncReleaseToCodeplay(storeName, finalVersionName,
|
|
1199
|
+
syncReleaseToCodeplay(storeName, finalVersionName, storeVersionCode, new Date().toISOString().slice(0, 10));
|
|
1183
1200
|
} else {
|
|
1184
1201
|
console.error(`❌ ${newExt.toUpperCase()} file not found after build.`);
|
|
1185
1202
|
}
|