Skip version checks if on dev branch

This commit is contained in:
Mcat12
2016-06-26 14:07:52 -04:00
parent 4d47bda041
commit c383b67d90
+6 -4
View File
@@ -33,7 +33,8 @@ function versionCompare(left, right) {
// Update check
$.getJSON("https://api.github.com/repos/pi-hole/pi-hole/releases/latest", function(json) {
if(versionCompare(piholeVersion, json.tag_name.slice(1)) < 0) {
// Skip if on dev
if(piholeVersion !== "vDev" && versionCompare(piholeVersion, json.tag_name.slice(1)) < 0) {
// Alert user
$("#alPiholeUpdate").show();
if(!$("#dropdown-menu").hasClass("open")) {
@@ -42,7 +43,8 @@ $.getJSON("https://api.github.com/repos/pi-hole/pi-hole/releases/latest", functi
}
});
$.getJSON("https://api.github.com/repos/pi-hole/AdminLTE/releases/latest", function(json) {
if(versionCompare(webVersion, json.tag_name.slice(1)) < 0) {
// Skip if on dev
if(webVersion !== "vDev" && versionCompare(webVersion, json.tag_name.slice(1)) < 0) {
// Alert user
$("#alWebUpdate").show();
if(!$("#dropdown-menu").hasClass("open")) {
@@ -53,7 +55,7 @@ $.getJSON("https://api.github.com/repos/pi-hole/AdminLTE/releases/latest", funct
/*
* Make sure that Pi-hole is updated to at least v2.7, since that is needed to use the sudo
* features of the interface
* features of the interface. Skip if on dev
*/
if(versionCompare(piholeVersion, "v2.7") < 0)
if(piholeVersion !== "vDev" && versionCompare(piholeVersion, "v2.7") < 0)
alert("Pi-hole needs to be updated to at least v2.7 before you can use features such as whitelisting/blacklisting from this web interface!")