Skip to content

Commit

Permalink
Remove git hash info (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmark authored Mar 19, 2023
1 parent ef6cd97 commit 5414a78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
18 changes: 1 addition & 17 deletions python/common/src/piscsi/sys_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -67,7 +52,6 @@ def running_env():

env = uname()
return {
"git": ra_git_version,
"env": f"{hardware}, {env.system} {env.release} {env.machine}",
}

Expand Down
2 changes: 1 addition & 1 deletion python/web/src/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h1>
{% 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"] }}
Expand Down

0 comments on commit 5414a78

Please sign in to comment.