Files
Hermes_rocket.chat_Plugin/plugin/archivar/version.py
T
Bernd (Hermes) 6f430dc4dc 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)
2026-08-20 15:33:58 +02:00

32 lines
1.1 KiB
Python

"""
V10.1: 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
Versionierung:
Major = 10 (Presence-Engine V10)
Minor = 1 (Widerspruch-Flow Feature)
"""
__version__ = "10.1"
__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:
"""Liefert den formatierten Versions-String für ::status und ::hilfe.
Returns:
z.B. '10.1 (b05010f)'
"""
return PLUGIN_VERSION