From 9e2adc9ce0af589aabceda12f1bcfb11a8294bcb Mon Sep 17 00:00:00 2001 From: Nuwan Date: Fri, 1 Sep 2023 13:51:16 +0530 Subject: [PATCH] fix artifact version upgrade --- web/app/assets/javascripts/clientUpdate.js | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/web/app/assets/javascripts/clientUpdate.js b/web/app/assets/javascripts/clientUpdate.js index e46d9f7f3..ed028a56b 100644 --- a/web/app/assets/javascripts/clientUpdate.js +++ b/web/app/assets/javascripts/clientUpdate.js @@ -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);