This commit is contained in:
lvmin
2023-08-10 03:23:49 -07:00
parent 057cea323f
commit e95b0e0c6c
2 changed files with 24 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import os
import subprocess
from functools import lru_cache
git = os.environ.get('GIT', "git")
fooocus_tag = '1.0.0'
@lru_cache()
def commit_hash():
try:
return subprocess.check_output([git, "rev-parse", "HEAD"], shell=False, encoding='utf8').strip()
except Exception:
return "<none>"