mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-24 17:06:18 -05:00
15 lines
346 B
Python
15 lines
346 B
Python
__version__ = '0.1-b'
|
|
|
|
import subprocess
|
|
|
|
|
|
def git_commit():
|
|
try:
|
|
cmd = ['git', 'log', '-1', '--format="%H"']
|
|
git_version = subprocess.check_output(cmd)
|
|
git_version = git_version.decode().strip().strip('"')
|
|
except Exception:
|
|
# Could not find git version...
|
|
return 'unknown'
|
|
|
|
return git_version
|