Update views.py

This commit is contained in:
nickchomey
2022-04-28 20:56:36 -06:00
committed by GitHub
parent 2ed8872086
commit c302ce1bb3

View File

@@ -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')