mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 01:06:09 +01:00
versionmanagment
This commit is contained in:
@@ -110,9 +110,25 @@ def versionManagment(request):
|
||||
currentVersion = VERSION
|
||||
currentBuild = str(BUILD)
|
||||
|
||||
u = "https://api.github.com/repos/usmannasir/cyberpanel/commits?sha=v%s.%s" % (latestVersion, latestBuild)
|
||||
logging.CyberCPLogFileWriter.writeToFile(u)
|
||||
r = requests.get(u)
|
||||
latestcomit = r.json()[0]['sha']
|
||||
|
||||
command ="git -C /usr/local/CyberCP/ rev-parse HEAD"
|
||||
output = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
Currentcomt = output.rstrip("\n")
|
||||
notechk = True;
|
||||
|
||||
if(Currentcomt == latestcomit):
|
||||
notechk = False;
|
||||
|
||||
|
||||
template = 'baseTemplate/versionManagment.html'
|
||||
finalData = {'build': currentBuild, 'currentVersion': currentVersion, 'latestVersion': latestVersion,
|
||||
'latestBuild': latestBuild}
|
||||
'latestBuild': latestBuild, 'latestcomit': latestcomit, "Currentcomt": Currentcomt, "Notecheck" : notechk }
|
||||
|
||||
|
||||
proc = httpProc(request, template, finalData, 'versionManagement')
|
||||
return proc.render()
|
||||
|
||||
Reference in New Issue
Block a user