1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-13 02:10:57 +00:00
oot/tools/ZAPD/ZAPD/genbuildinfo.py
fig02 42af56b231
git subrepo pull --force tools/ZAPD (#718)
subrepo:
  subdir:   "tools/ZAPD"
  merged:   "4bf6600a3"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "4bf6600a3"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
2021-03-14 11:40:25 -04:00

12 lines
No EOL
425 B
Python

#!/usr/bin/python3
from datetime import datetime
import getpass
import subprocess
with open("ZAPD/BuildInfo.h", "w+") as buildFile:
label = subprocess.check_output(["git", "describe", "--always"]).strip().decode("utf-8")
now = datetime.now()
buildFile.write("const char gBuildHash[] = \"" + label + "\";\n")
#buildFile.write("const char gBuildDate[] = \"" + now.strftime("%Y-%m-%d %H:%M:%S") + "\";\n")