]> arthur.barton.de Git - netdata.git/commitdiff
Revert "when version.txt and internal version differ, use the internal one"
authorAlexander Barton <alex@barton.de>
Mon, 13 Feb 2017 13:54:22 +0000 (14:54 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 13 Feb 2017 13:54:22 +0000 (14:54 +0100)
netdata should compare the saved version number with its repository,
because comparing the Git ID for the "ab-debian" branch makes no sense:
these commits aren't available in the official repository at all, and
therefore the update check would always trigger and never find the
correct changes on GitHub ...

This reverts commit 7647a12b03d31e90cc2edd1546132bc0be973766.

web/index.html

index 7bba3f4d5ef465b5563991ec722d1f73f7d9b18f..13aa53c6e4d44ae4222f7518133f942a0fb92d53 100644 (file)
             })
             .done(function(data) {
                 data = data.replace(/(\r\n|\n|\r| |\t)/gm,"");
-
-                var c = getNetdataCommitIdFromVersion();
-                if(c !== null && data.length === 40 && data.substring(0, 7) !== c) {
-                    versionLog('Installed files commit id and internal netdata git commit id do not match');
-                    data = c;
+                if(data.length !== 40) {
+                    var c = getNetdataCommitIdFromVersion();
+                    if(c === null) versionLog('Cannot find the git commit id of netdata.');
+                    callback(c);
                 }
-
-                if(data.length >= 7) {
+                else {
                     versionLog('Installed git commit id of netdata is ' + data);
                     document.getElementById('netdataCommitId').innerHTML = data.substring(0, 7);
                     callback(data);