mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-12 17:58:50 +01:00
fix git reset hard version control tangle
This commit is contained in:
parent
27d113c613
commit
6b2ad6a58a
@ -14,7 +14,7 @@ from UI.icon_item import IconItem
|
||||
from UI.icon_pool import MyIconPool
|
||||
from UI.label import Label
|
||||
from UI.fonts import fonts
|
||||
from UI.util_funcs import midRect,CmdClean
|
||||
from UI.util_funcs import midRect,CmdClean,get_git_revision_short_hash
|
||||
from UI.keys_def import CurKeys
|
||||
from UI.confirm_page import ConfirmPage
|
||||
from UI.download import Download
|
||||
@ -282,7 +282,9 @@ class UpdatePage(Page):
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
elif "gitversion" in json_: ### just use git to run update
|
||||
if config.VERSION != json_["gitversion"]:
|
||||
current_git_version = get_git_revision_short_hash()
|
||||
|
||||
if current_git_version != json_["gitversion"]:
|
||||
self._ConfirmPage._URL = None
|
||||
self._ConfirmPage._MD5 = None
|
||||
self._ConfirmPage._GIT = True
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
import pygame
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
#from libs import easing
|
||||
#from datetime import datetime
|
||||
@ -11,6 +12,14 @@ import os
|
||||
import string
|
||||
from Xlib import X,display
|
||||
|
||||
|
||||
def get_git_revision_hash():
|
||||
return subprocess.check_output(['git', 'rev-parse', 'HEAD'])
|
||||
|
||||
def get_git_revision_short_hash():
|
||||
return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])
|
||||
|
||||
|
||||
def X_center_mouse():
|
||||
d = display.Display()
|
||||
s = d.screen()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user