Skip to content

Commit

Permalink
Comply with suggested semver scheme
Browse files Browse the repository at this point in the history
Also use unique enough short hash instead of full one.
  • Loading branch information
godsic committed Dec 29, 2023
1 parent ccf8a83 commit 357ef25
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions _signal_processing/krakenSDR_signal_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
from scipy import fft, signal
from signal_utils import can_store_file, fm_demod, write_wav
from variables import (
SOFTWARE_GIT_HASH,
SOFTWARE_GIT_SHORT_HASH,
SOFTWARE_VERSION,
SYSTEM_UNAME,
root_path,
Expand Down Expand Up @@ -305,7 +305,7 @@ def save_processing_status(self) -> None:
status["host_os_version"] = SYSTEM_UNAME.release
status["host_os_architecture"] = SYSTEM_UNAME.machine
status["software_version"] = SOFTWARE_VERSION
status["software_git_hash"] = SOFTWARE_GIT_HASH
status["software_git_short_hash"] = SOFTWARE_GIT_SHORT_HASH
status["uptime_ms"] = int(time.monotonic() * 1e3)
status["gps_status"] = self.gps_status

Expand All @@ -324,7 +324,7 @@ def save_processing_status(self) -> None:
daq_status["buffer_size_ms"] = (
self.module_receiver.iq_header.cpi_length / self.module_receiver.iq_header.sampling_freq
) * 1e3
daq_status["dropped_frames"] = self.dropped_frames
daq_status["num_dropped_frames"] = self.dropped_frames

status["daq_status"] = daq_status
status["daq_ok"] = (
Expand Down
4 changes: 2 additions & 2 deletions _ui/_web_interface/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
try:
import git

SOFTWARE_GIT_HASH = git.Repo().head.object.hexsha
SOFTWARE_GIT_SHORT_HASH = git.Repo().head.object.hexsha[:7]
except Exception:
SOFTWARE_GIT_HASH = "e5df8c99ef2447145bbfb88cc6ac28cf94f1906e"
SOFTWARE_GIT_SHORT_HASH = "e5df8c9"

SOFTWARE_VERSION = "1.7.0"
SYSTEM_UNAME = platform.uname()
Expand Down
4 changes: 2 additions & 2 deletions _ui/_web_interface/views/system_control_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from maindash import web_interface

# isort: on
from variables import SOFTWARE_GIT_HASH, SOFTWARE_VERSION, option
from variables import SOFTWARE_GIT_SHORT_HASH, SOFTWARE_VERSION, option


def get_system_control_card_layout():
Expand Down Expand Up @@ -65,7 +65,7 @@ def get_system_control_card_layout():
],
className="field",
),
html.Div(f"Version {SOFTWARE_VERSION} ({SOFTWARE_GIT_HASH})"),
html.Div(f"Version {SOFTWARE_VERSION}+git.{SOFTWARE_GIT_SHORT_HASH}"),
],
id="system_control_container",
style={"display": "block"} if web_interface.en_system_control else {"display": "none"},
Expand Down

0 comments on commit 357ef25

Please sign in to comment.