HotFix for AutoUpdate

This commit is contained in:
UKDTOM 2020-10-03 12:31:50 +02:00
parent 23650d4743
commit ae7e0cbca9
3 changed files with 6 additions and 37 deletions

View file

@ -315,36 +315,6 @@ const github = new class GitHub {
const releases = await response.json(); const releases = await response.json();
return releases; return releases;
} }
// Is an update present?
async UpdatePresentDEAD(){
// Get release page from GitHub
const releases = await this.Releases();
// Walk releases
// eslint-disable-next-line no-unused-vars
let release = {}
for(var i = 0; i < releases.length; i++)
{
// Check for current release on GitHub
if (wtconfig.get('Update.Beta') == releases[i].prerelease){
release = releases[i];
if ('v' + wtutils.AppVersion != release.tag_name){
console.log('Ged Update Present');
//Store.commit("UPDATE_GIT_PRESENT", true);
/*
store.commit("UPDATE_GIT_NAME", releases[i].name);
store.commit("UPDATE_GIT_VERSION", releases[i].tag_name);
store.commit("UPDATE_GIT_DESCRIPTION", releases[i].body);
store.commit("UPDATE_GIT_DOWNLOADURL", releases[i].url);
store.commit("UPDATE_GIT_PUBLISHEDAT", releases[i].published_at);
*/
}
break;
}
}
}
} }

View file

@ -72,12 +72,12 @@
wtconfig.set('Log.fileLevel', value) wtconfig.set('Log.fileLevel', value)
}, },
setBeta: function(value){ setBeta: function(value){
log.info(`Beta level set to ${value}`) log.info(`Beta level set to ${value}`);
wtconfig.set('Update.Beta', value) wtconfig.set('Update.Beta', value == 'true');
}, },
setLogLevelConsole: function(value){ setLogLevelConsole: function(value){
log.info(`Log Console level set to ${value}`) log.info(`Log Console level set to ${value}`);
wtconfig.set('Log.consoleLevel', value) wtconfig.set('Log.consoleLevel', value);
}, },
getLogFileSize: function(){ getLogFileSize: function(){
const logSizeBytes = wtconfig.get('Log.maxSize'); const logSizeBytes = wtconfig.get('Log.maxSize');

View file

@ -58,8 +58,7 @@ export default {
for(var i = 0; i < releases.length; i++) for(var i = 0; i < releases.length; i++)
{ {
// Check for current release on GitHub // Check for current release on GitHub
if (wtconfig.get('Update.Beta') == releases[i].prerelease){ if ( Boolean(wtconfig.get('Update.Beta')) == releases[i].prerelease){
//release = releases[i];
if ('v' + wtutils.AppVersion != releases[i].tag_name){ if ('v' + wtutils.AppVersion != releases[i].tag_name){
log.info('Update detected'); log.info('Update detected');
this.body = this.$t('Common.Update.Body', [releases[i].name, releases[i].published_at.substring(0, 10)]), this.body = this.$t('Common.Update.Body', [releases[i].name, releases[i].published_at.substring(0, 10)]),