From f817ef6925987f231a83b85dbf1b169339c7a16f Mon Sep 17 00:00:00 2001 From: wez3 Date: Mon, 23 Jan 2017 19:04:07 +0100 Subject: [PATCH 1/3] Fix for git issue #83 --- modules/webconfig.py | 9 ++++++--- static/js/domoboard.js | 10 ++++++++-- templates/settings.html | 4 ++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/modules/webconfig.py b/modules/webconfig.py index 6b63d70..5009d89 100644 --- a/modules/webconfig.py +++ b/modules/webconfig.py @@ -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" diff --git a/static/js/domoboard.js b/static/js/domoboard.js index b47a3c1..b03982c 100644 --- a/static/js/domoboard.js +++ b/static/js/domoboard.js @@ -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) { diff --git a/templates/settings.html b/templates/settings.html index ce9dc00..85ed95c 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -30,6 +30,10 @@

Hurray!


There is no update available for Domoboard.

+
+

To bad!


+ Your Domoboard cannot update itself. Domoboard needs to installed through a git clone in order to support auto-update. Updates are performed using git.

+
From 0c1c028e588474bb103ce6ec32f823c83787df69 Mon Sep 17 00:00:00 2001 From: wez3 Date: Tue, 24 Jan 2017 21:14:16 +0100 Subject: [PATCH 2/3] Update settings.html --- templates/settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/settings.html b/templates/settings.html index 85ed95c..95cd0f1 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -32,7 +32,7 @@

To bad!


- Your Domoboard cannot update itself. Domoboard needs to installed through a git clone in order to support auto-update. Updates are performed using git.

+ Your Domoboard cannot update itself. Domoboard needs to be installed through a git clone in order to support auto-update. Updates are performed using git.

From 1fa4130c875f6aeb65ec0a8a8ff37b5bf0a82002 Mon Sep 17 00:00:00 2001 From: wez3 Date: Tue, 24 Jan 2017 21:34:21 +0100 Subject: [PATCH 3/3] Update VERSION.md --- VERSION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.md b/VERSION.md index 59e9e60..bb83058 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -1.0.11 +1.0.12