feat: add git hash of build everywhere

This commit is contained in:
Jun Siang Cheah
2024-05-22 20:22:38 +01:00
parent d0d76e2ad5
commit a579f5f8cf
7 changed files with 24 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
# noqa: INP001
import os
import shutil
import subprocess
from sys import stderr
@@ -18,4 +19,5 @@ class CustomBuildHook(BuildHookInterface):
stderr.write("### npm install\n")
subprocess.run([npm, "install"], check=True) # noqa: S603
stderr.write("\n### npm run build\n")
os.environ["WEBUI_VERSION"] = version
subprocess.run([npm, "run", "build"], check=True) # noqa: S603