feat(V10.1): PLUGIN_VERSION-Konstante + Versionsanzeige in ::status
- version.py: __version__ 10.0.2 -> 10.1, PLUGIN_VERSION-Konstante (Format 'Major.Minor (commit)'), get_version_string() nutzt sie - adapter.py _cmd_status(): uebergibt plugin_version=PLUGIN_VERSION an build_status_text() (war vorher nicht verdrahtet) - install.sh setzt __commit__ weiterhin beim Deployment (statischer Hash, da deploytes Plugin-Verzeichnis kein Git-Repo ist)
This commit is contained in:
@@ -4235,6 +4235,7 @@ class RocketChatAdapter(BasePlatformAdapter):
|
|||||||
async def _cmd_status(self, room_id: str, args: str) -> str:
|
async def _cmd_status(self, room_id: str, args: str) -> str:
|
||||||
"""::status — Zeigt den aktuellen Plugin-Status."""
|
"""::status — Zeigt den aktuellen Plugin-Status."""
|
||||||
from archivar.inline_commands import build_status_text
|
from archivar.inline_commands import build_status_text
|
||||||
|
from archivar.version import PLUGIN_VERSION
|
||||||
|
|
||||||
room_count = 0
|
room_count = 0
|
||||||
archivar_active = False
|
archivar_active = False
|
||||||
@@ -4268,6 +4269,7 @@ class RocketChatAdapter(BasePlatformAdapter):
|
|||||||
presence_enabled=presence_enabled,
|
presence_enabled=presence_enabled,
|
||||||
current_status=current_status,
|
current_status=current_status,
|
||||||
pulse_active=pulse_active,
|
pulse_active=pulse_active,
|
||||||
|
plugin_version=PLUGIN_VERSION,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _cmd_reset(self, room_id: str, args: str) -> str:
|
async def _cmd_reset(self, room_id: str, args: str) -> str:
|
||||||
|
|||||||
@@ -1,19 +1,31 @@
|
|||||||
"""
|
"""
|
||||||
V10.0.2: Plugin-Version — zentrale Versionsnummer für ::status und ::hilfe.
|
V10.1: Plugin-Version — zentrale Versionsnummer für ::status und ::hilfe.
|
||||||
|
|
||||||
Wird von install.sh beim Deployment aktualisiert:
|
Wird von install.sh beim Deployment aktualisiert:
|
||||||
COMMIT=$(git rev-parse --short HEAD)
|
COMMIT=$(git rev-parse --short HEAD)
|
||||||
sed -i "s/__commit__ = .*/__commit__ = \"$COMMIT\"/" version.py
|
sed -i "s/__commit__ = .*/__commit__ = \"$COMMIT\"/" version.py
|
||||||
|
|
||||||
|
Versionierung:
|
||||||
|
Major = 10 (Presence-Engine V10)
|
||||||
|
Minor = 1 (Widerspruch-Flow Feature)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "10.0.2"
|
__version__ = "10.1"
|
||||||
__commit__ = "e7668f9" # wird von install.sh auf aktuellen Git-Hash gesetzt
|
__commit__ = "b05010f" # wird von install.sh auf aktuellen Git-Hash gesetzt
|
||||||
|
|
||||||
|
# PLUGIN_VERSION: formatierter Versions-String für ::status / ::hilfe.
|
||||||
|
# Format: 'Major.Minor (commit-hash-kurz)' — z.B. '10.1 (b05010f)'.
|
||||||
|
# Statisch im Code (kein dynamischer git-Aufruf zur Laufzeit), weil das
|
||||||
|
# deployte Plugin-Verzeichnis (~/.hermes/plugins/platforms/rocketchat)
|
||||||
|
# KEIN Git-Repo ist und git im Gateway-Kontext nicht zuverlässig verfügbar
|
||||||
|
# ist. Aktualisierung erfolgt durch install.sh beim Deployment (P-003/P-019).
|
||||||
|
PLUGIN_VERSION = f"{__version__} ({__commit__})"
|
||||||
|
|
||||||
|
|
||||||
def get_version_string() -> str:
|
def get_version_string() -> str:
|
||||||
"""Liefert den formatierten Versions-String für ::status und ::hilfe.
|
"""Liefert den formatierten Versions-String für ::status und ::hilfe.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
z.B. 'V10.0.2 (e7668f9)'
|
z.B. '10.1 (b05010f)'
|
||||||
"""
|
"""
|
||||||
return f"V{__version__} ({__commit__})"
|
return PLUGIN_VERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user