feat(deploy): tag di versione nei msg Telegram, +1 ad ogni deploy
File VERSION (semver, cotto nell'immagine) letto da src/version.py. Compare nelle notifiche trade (telegram_notifier) e nel report orario -> sai quale codice ha generato quale msg. scripts/bump_version.py incrementa la patch; scripts/deploy.sh = bump+commit+rebuild (versione aumenta ad OGNI deploy). v1.0.0 = primo release versionato (include hurst loss-guard). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,8 @@ import urllib.request
|
||||
import urllib.parse
|
||||
import json
|
||||
|
||||
from src.version import APP_VERSION
|
||||
|
||||
BOT_TOKEN = os.environ.get("TELEGRAM_BOT_TOKEN", "")
|
||||
CHAT_ID = os.environ.get("TELEGRAM_CHAT_ID", "")
|
||||
|
||||
@@ -30,7 +32,7 @@ def send_telegram(text: str) -> bool:
|
||||
def notify_event(event: str, data: dict | None = None):
|
||||
if event not in NOTIFY_EVENTS:
|
||||
return
|
||||
lines = [f"📊 <b>{event}</b>"]
|
||||
lines = [f"📊 <b>{event}</b> <code>v{APP_VERSION}</code>"]
|
||||
if data:
|
||||
for k, v in data.items():
|
||||
if k in ("signal",):
|
||||
|
||||
Reference in New Issue
Block a user