From e2370e83bd5dae49f89ce849f8051e2a4e8f0598 Mon Sep 17 00:00:00 2001 From: nippy Date: Thu, 13 Aug 2026 21:03:47 +0200 Subject: new iso --- scripts/discord-notify.sh | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'scripts/discord-notify.sh') diff --git a/scripts/discord-notify.sh b/scripts/discord-notify.sh index 6b732f7..df5d60a 100755 --- a/scripts/discord-notify.sh +++ b/scripts/discord-notify.sh @@ -11,24 +11,18 @@ if [ -z "${WEBHOOK}" ]; then exit 0 fi -JSON=$(TAG="${TAG}" ISO_NAME="${ISO_NAME}" ISO_SHA256="${ISO_SHA256}" python3 -c " -import json, os -tag = os.environ.get('TAG', 'unknown') -name = os.environ.get('ISO_NAME', 'unknown') -sha = os.environ.get('ISO_SHA256', 'n/a') -msg = { - 'content': '\n'.join([ - '@everyone', - '> **RaveOS · Új ISO elérhető!**', - '> ', - f'> Verzió: **{tag}**', - f'> Fájl: `{name}`', - '> Letöltés: https://links.rp1.hu/raveos-download', - f'> SHA256: `{sha}`', - ]), - 'allowed_mentions': {'parse': ['everyone']}, -} -print(json.dumps(msg, ensure_ascii=False)) +CONTENT="@everyone +> **RaveOS · Uj ISO elerheto!** +> +> Verzio: **${TAG}** +> Fajl: \`${ISO_NAME}\` +> Letoltes: https://links.rp1.hu/raveos-download +> SHA256: \`${ISO_SHA256}\`" + +JSON=$(python3 -c " +import json +content = '''${CONTENT}''' +print(json.dumps({'content': content, 'allowed_mentions': {'parse': ['everyone']}}, ensure_ascii=False)) ") curl -s \ -- cgit v1.3