Final points.

Ready to merge
This commit is contained in:
birdhouse 2019-06-23 00:38:06 +02:00
parent e37abbb62d
commit 9d9999b861
2 changed files with 6 additions and 22 deletions

View File

@ -18,7 +18,7 @@
<script> <script>
// performTranslation('trans_update'); // performTranslation('trans_update');
performTranslation(); performTranslation();
if(window.gitHubVersionList != null) if(Array.isArray(window.gitHubVersionList) && window.gitHubVersionList.length)
{ {
for (key in window.gitHubVersionList) for (key in window.gitHubVersionList)
{ {

View File

@ -85,18 +85,9 @@ $(document).ready( function() {
for(i in releases) for(i in releases)
{ {
console.log(releases[i].prerelease)
if(releases[i].prerelease == true) if(releases[i].prerelease == true)
{ {
//for(j in releases[i].assets) window.latestBetaVersion = releases[i];
//{
//console.log(releases[i].assets[j])
//if(releases[i].assets[j].name.indexOf('Beta') > -1)
//{
window.latestBetaVersion = releases[i];
//break;
//}
//}
break; break;
} }
} }
@ -104,22 +95,15 @@ $(document).ready( function() {
$.get( window.gitHubReleaseApiUrl + "/latest", function( latest ) { $.get( window.gitHubReleaseApiUrl + "/latest", function( latest ) {
window.latestStableVersion = latest; window.latestStableVersion = latest;
console.log(window.latestBetaVersion) if(window.serverConfig.general.versionBranch == "Beta" && window.latestStableVersion.tag_name.replace(/\./g, '') <= window.latestBetaVersion.tag_name.replace(/\./g, ''))
console.log(window.latestStableVersion) {
//debugger;
console.log("Stable"+ window.latestStableVersion.tag_name.replace(/\./g, ''))
console.log("Beta"+ window.latestBetaVersion.tag_name.replace(/\./g, ''))
if(window.serverConfig.general.versionBranch == "Beta" && window.latestStableVersion.tag_name.replace(/\./g, '') <= window.latestBetaVersion.tag_name.replace(/\./g, '')) {
window.latestVersion = window.latestBetaVersion; window.latestVersion = window.latestBetaVersion;
} }
else { else
{
window.latestVersion = window.latestStableVersion; window.latestVersion = window.latestStableVersion;
} }
console.log(latestVersion)
var cleanLatestVersion = window.latestVersion.tag_name.replace(/\./g, ''); var cleanLatestVersion = window.latestVersion.tag_name.replace(/\./g, '');
var cleanCurrentVersion = window.currentVersion.replace(/\./g, ''); var cleanCurrentVersion = window.currentVersion.replace(/\./g, '');