fix artifact version upgrade

This commit is contained in:
Nuwan 2023-09-01 13:51:16 +05:30
parent c8be3b847f
commit 9e2adc9ce0
1 changed files with 13 additions and 13 deletions

View File

@ -201,7 +201,7 @@
}
}
function runCheck(product, version, uri, size, currentVersion) {
async function runCheck(product, version, uri, size, currentVersion) {
if (app.clientUpdating) {
logger.debug("client is already updating; skipping")
@ -209,18 +209,18 @@
}
if(currentVersion === undefined) {
context.jamClient.ClientUpdateVersion().then(function(currentVersion){
if (!forceShow && (currentVersion == null || currentVersion.indexOf("Compiled")) > -1) {
// this is a developer build; it doesn't make much sense to do an packaged update, so skip
logger.debug("skipping client update check because this is a development build ('" + currentVersion + "')")
return;
}
// # strange client oddity: remove quotes, if found, from start and finish of version.
if (currentVersion.indexOf('"') == 0 && currentVersion.lastIndexOf('"') == currentVersion.length - 1) {
currentVersion = currentVersion.substring(1, currentVersion.length - 1);
}
});
currentVersion = await context.jamClient.ClientUpdateVersion() //.then(function(currentVersion){
if (!forceShow && (currentVersion == null || currentVersion.indexOf("Compiled")) > -1) {
// this is a developer build; it doesn't make much sense to do an packaged update, so skip
logger.debug("skipping client update check because this is a development build ('" + currentVersion + "')")
return;
}
// # strange client oddity: remove quotes, if found, from start and finish of version.
if (currentVersion.indexOf('"') == 0 && currentVersion.lastIndexOf('"') == currentVersion.length - 1) {
currentVersion = currentVersion.substring(1, currentVersion.length - 1);
}
//});
}
console.log("_DEBUG_ our client version: " + currentVersion + ", server client version: " + version);