diff --git a/plugin/adapter.py b/plugin/adapter.py index 0b50b77..144b1a5 100644 --- a/plugin/adapter.py +++ b/plugin/adapter.py @@ -3713,6 +3713,7 @@ class RocketChatAdapter(BasePlatformAdapter): is_natural_help_request, build_help_text, ) + from archivar.version import get_version_string stripped = text.strip() @@ -3731,6 +3732,7 @@ class RocketChatAdapter(BasePlatformAdapter): help_text = build_help_text( self._inline_commands, room_map_summary=self._room_map_summary, + plugin_version=get_version_string(), ) unknown_msg = ( f"Unbekannter Befehl `::{command}`. " @@ -3752,6 +3754,7 @@ class RocketChatAdapter(BasePlatformAdapter): help_text = build_help_text( self._inline_commands, room_map_summary=self._room_map_summary, + plugin_version=get_version_string(), ) unknown_msg = ( f"Unbekannter Befehl `::{cmd_question}`. " @@ -3765,6 +3768,7 @@ class RocketChatAdapter(BasePlatformAdapter): help_text = build_help_text( self._inline_commands, room_map_summary=self._room_map_summary, + plugin_version=get_version_string(), ) await self._post_message_with_retry(room_id, help_text) return True @@ -3844,6 +3848,7 @@ class RocketChatAdapter(BasePlatformAdapter): async def _cmd_hilfe(self, room_id: str, args: str) -> str: """::hilfe — Zeigt die Hilfeseite mit allen Befehlen.""" from archivar.inline_commands import build_help_text + from archivar.version import get_version_string # V9: PresenceEngine-Werte lesen (mit _has_presence-Guard) presence_enabled = None @@ -3858,11 +3863,13 @@ class RocketChatAdapter(BasePlatformAdapter): room_map_summary=self._room_map_summary, presence_enabled=presence_enabled, current_status=current_status, + plugin_version=get_version_string(), ) async def _cmd_status(self, room_id: str, args: str) -> str: """::status — Zeigt den aktuellen Plugin-Status.""" from archivar.inline_commands import build_status_text + from archivar.version import get_version_string room_count = 0 archivar_active = False @@ -3896,6 +3903,7 @@ class RocketChatAdapter(BasePlatformAdapter): presence_enabled=presence_enabled, current_status=current_status, pulse_active=pulse_active, + plugin_version=get_version_string(), ) async def _cmd_reset(self, room_id: str, args: str) -> str: diff --git a/plugin/archivar/version.py b/plugin/archivar/version.py index e929cf3..edcbac9 100644 --- a/plugin/archivar/version.py +++ b/plugin/archivar/version.py @@ -1,10 +1,19 @@ """ -V9.2: Plugin-Version — zentrale Versionsnummer für ::status und ::hilfe. +V10.0.2: Plugin-Version — zentrale Versionsnummer für ::status und ::hilfe. Wird von install.sh beim Deployment aktualisiert: COMMIT=$(git rev-parse --short HEAD) sed -i "s/__commit__ = .*/__commit__ = \"$COMMIT\"/" version.py """ -__version__ = "9.2" -__commit__ = "auto" # wird von install.sh auf aktuellen Git-Hash gesetzt +__version__ = "10.0.2" +__commit__ = "e7668f9" # wird von install.sh auf aktuellen Git-Hash gesetzt + + +def get_version_string() -> str: + """Liefert den formatierten Versions-String für ::status und ::hilfe. + + Returns: + z.B. 'V10.0.2 (e7668f9)' + """ + return f"V{__version__} ({__commit__})"