Fix for git issue #83

This commit is contained in:
wez3 2017-01-23 19:04:07 +01:00
parent 1f2aefe5b2
commit f817ef6925
3 changed files with 18 additions and 5 deletions

View File

@ -23,6 +23,9 @@ def performUpgrade():
return "Upgrade completed."
def getCurrentBranch():
repo = git.Repo('.')
branch = repo.active_branch
return branch.name
try:
repo = git.Repo('.')
branch = repo.active_branch
return branch.name
except:
return "None"

View File

@ -434,8 +434,10 @@ function checkVersion(branch) {
success: function( data ) {
if (branch == "master") {
dataFloat = data.split(",")[0];
} else {
} else if (branch == "develop") {
dataFloat = data.split(",")[1];
} else {
return 0;
}
var compare = versionCompare(dataFloat, version);
if (compare == 1) {
@ -456,8 +458,12 @@ function checkVersionSettings(branch) {
success: function( data ) {
if (branch == "master") {
dataFloat = data.split(",")[0];
} else {
} else if (branch == "develop") {
dataFloat = data.split(",")[1];
} else {
$( "#updateView_no_git" ).removeClass("hide_update");
$( "#updateView_no_git" ).addClass("show_update");
return 0;
}
var compare = versionCompare(dataFloat, version);
if (compare == 1) {

View File

@ -30,6 +30,10 @@
<h2>Hurray!</h2><br />
There is no update available for Domoboard.<br /><br />
</div>
<div id="updateView_no_git" class="hide_update">
<h2>To bad!</h2><br />
Your Domoboard cannot update itself. Domoboard needs to installed through a git clone in order to support auto-update. Updates are performed using git.<br /><br />
</div>
</div>
<div id="plugins" class="tabcontent">
<div id="pluginView">