From c302ce1bb39942b24ca377d025a7f8eeae5f1328 Mon Sep 17 00:00:00 2001 From: nickchomey <88559987+nickchomey@users.noreply.github.com> Date: Thu, 28 Apr 2022 20:56:36 -0600 Subject: [PATCH] Update views.py --- baseTemplate/views.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/baseTemplate/views.py b/baseTemplate/views.py index 2aa65dd37..c1bd9b7f3 100755 --- a/baseTemplate/views.py +++ b/baseTemplate/views.py @@ -120,6 +120,14 @@ def versionManagment(request): Currentcomt = output.rstrip("\n") notechk = True; + + command ="git fetch" + output = ProcessUtilities.outputExecutioner(command) + + command ="git -C /usr/local/CyberCP/ log %s..%s --pretty=oneline | wc -l" % ( Currentcomt, latestcomit) + output = ProcessUtilities.outputExecutioner(command) + + numCommits = output.rstrip("\n") if(Currentcomt == latestcomit): notechk = False; @@ -127,7 +135,7 @@ def versionManagment(request): template = 'baseTemplate/versionManagment.html' finalData = {'build': currentBuild, 'currentVersion': currentVersion, 'latestVersion': latestVersion, - 'latestBuild': latestBuild, 'latestcomit': latestcomit, "Currentcomt": Currentcomt, "Notecheck" : notechk } + 'latestBuild': latestBuild, 'latestcomit': latestcomit, "Currentcomt": Currentcomt, "Notecheck" : notechk, "numCommits": numCommits } proc = httpProc(request, template, finalData, 'versionManagement')