Remove git hash info (#1129)

This commit is contained in:
Daniel Markstedt 2023-03-19 13:46:43 -07:00 committed by GitHub
parent ef6cd97656
commit 5414a78098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 18 deletions

View File

@ -21,23 +21,8 @@ class SysCmds:
@staticmethod
def running_env():
"""
Returns (str) git and (str) env
git contains the git hash of the checked out code
env is the various system information where this app is running
Returns (str) env, with details on the system hardware and software
"""
try:
ra_git_version = (
subprocess.run(
["git", "rev-parse", "HEAD"],
capture_output=True,
check=True,
)
.stdout.decode("utf-8")
.strip()
)
except subprocess.CalledProcessError as error:
logging.warning(SHELL_ERROR, error.cmd, error.stderr.decode("utf-8"))
ra_git_version = ""
PROC_MODEL_PATH = "/proc/device-tree/model"
SYS_VENDOR_PATH = "/sys/devices/virtual/dmi/id/sys_vendor"
@ -67,7 +52,6 @@ class SysCmds:
env = uname()
return {
"git": ra_git_version,
"env": f"{hardware}, {env.system} {env.release} {env.machine}",
}

View File

@ -117,7 +117,7 @@
{% endif %}
</div>
<div>
{{ _("PiSCSI version:") }} <b>{{ env["version"] }} <a href="https://github.com/PiSCSI/piscsi/commit/{{ env["running_env"]["git"] }}" target="_blank">{{ env["running_env"]["git"][:7] }}</a></b>
{{ _("PiSCSI software version:") }} <b>{{ env["version"] }}</b>
</div>
<div>
{{ _("Hardware and OS:") }} {{ env["running_env"]["env"] }}