diff --git a/lib/desktop_updater.js b/lib/desktop_updater.js index fbb46c994bfd1752ba86b7faa63ea37aea001d82..d925f8cea6f9de2ca19b8eb94a6c96e445f08419 100755 --- a/lib/desktop_updater.js +++ b/lib/desktop_updater.js @@ -573,7 +573,8 @@ if (process.env.currentVersion) { if (version_data) { console.log('[DTU]', 'latest-version', 'if condition', process.env.currentBuild); if(process.env.currentBuild==='0') { - process.env.currentBuild = version_data.buildNumber; + process.env.currentBuild = version_data.version; + // process.env.currentBuild = version_data.buildNumber; } getAppVesrion(); } else { @@ -628,11 +629,34 @@ if (process.env.currentVersion) { // }; console.log('[DTU] current build',process.env.currentBuild); - console.log('[DTU] appversionObj.currentBuild > process.env.currentBuild',(appversionObj.currentBuild > parseInt(process.env.currentBuild))); + // console.log('[DTU] appversionObj.currentBuild > process.env.currentBuild',(appversionObj.currentBuild > parseInt(process.env.currentBuild))); if(process.env.currentBuild){ - if(appversionObj.build > parseInt(process.env.currentBuild)) { + var api_build_split = appversionObj.build.split('.'); + var app_env_curr_build_split = process.env.currentBuild.split('.'); + // if(appversionObj.build > parseInt(process.env.currentBuild)) { + // isBuildUpdate = true; + // } + console.log('[DTU] check build major ',api_build_split[0],'>',app_env_curr_build_split[0]); + console.log('[DTU] check build minor ',api_build_split[1],'>',app_env_curr_build_split[1]); + console.log('[DTU] check build patch ',api_build_split[2],'>',app_env_curr_build_split[2]); + // check major + if(parseInt(api_build_split[0])>parseInt(app_env_curr_build_split[0])){ isBuildUpdate = true; + }else{ + // check minor + if(parseInt(api_build_split[1])>parseInt(app_env_curr_build_split[1])){ + isBuildUpdate = true; + }else{ + // check patch + if(parseInt(api_build_split[2])>parseInt(app_env_curr_build_split[2])){ + isBuildUpdate = true; + }else{ + + isBuildUpdate = false; + } + } } + } console.log('[DTU] current version',process.env.currentVersion); if(process.env.currentVersion){ diff --git a/lib/releaseNotes/releaseNotesDesktop.json b/lib/releaseNotes/releaseNotesDesktop.json index f90059a8f4ea1907fd9add771462e4f5f9e61c23..5f5c74a9aacd9b400e9297b0a2ada33c9afd48b3 100644 --- a/lib/releaseNotes/releaseNotesDesktop.json +++ b/lib/releaseNotes/releaseNotesDesktop.json @@ -1,11 +1,11 @@ { "0.4.1": { - "1589451878": [ + "0.34.0": [ "Stability improvements" ] }, "0.4.0": { - "1589451878": [ + "0.34.0": [ "Electron Framework updated to latest version 8.0.1", "Fixed select all keyboard shortcut (command + A) issue in Mac OS", "Handled mic and camera permission issue on Mac OS", @@ -19,7 +19,7 @@ ] }, "0.3.8": { - "1589451878": [ + "content": [ "Updated login page design.", "Added download guideline in app update process.", "Added release notes in update popup.",