From 697c6c1aadc6b144a2ad44686c4cb8eeccafd01c Mon Sep 17 00:00:00 2001 From: marchingon12 Date: Thu, 8 Apr 2021 11:51:31 +0200 Subject: [PATCH] semi final --- ci-build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci-build.sh b/ci-build.sh index 5ac230824..fd523a08f 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -1,14 +1,15 @@ #!/bin/bash +# Declare variables MSG_URL="https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" DOC_URL="https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument" COMMIT_URL="https://gitlab.com/AuroraOSS/AuroraStore/-/commit/$CI_COMMIT_SHA" TEXT="Project:+[${CI_PROJECT_NAME}](${CI_PROJECT_URL})%0A[*⚒️+Building*](${CI_JOB_URL})+with+HEAD+at+[*${CI_COMMIT_SHORT_SHA}*](${COMMIT_URL})" - +# send message to Telegram channel curl -s -X POST $MSG_URL -d chat_id=$TELEGRAM_CHAT_ID \ -d "disable_web_page_preview=true" \ -d "parse_mode=HTML" \ -d text=$TEXT -curl -s -X POST $MSG_URL\?text\=Project:+%3Ca+href=$CI_PROJECT_URL%3E$CI_PROJECT_NAME%3C/a%3E%0A%3Ca+href=$CI_JOB_URL%3E%3Cb%3E⚒️+Building%3C/b%3E%3C/a%3E+with+HEAD+at+%3Ca+href=$COMMIT_URL%3E%3Cb%3E$CI_COMMIT_SHORT_SHA%3C/b%3E%3C/a%3E+by+$CI_COMMIT_AUTHOR -d chat_id=-1001243261474 -d "parse_mode=HTML" -d "disable_web_page_preview=true" \ No newline at end of file +# NOTES: $CI_COMMIT_AUTHOR and $CI_COMMIT_BRANCH won't work due to Telegram's awful Markdown flavour. \ No newline at end of file