mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
18 lines
315 B
Python
18 lines
315 B
Python
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>"
|
|
|