代码拉取完成,页面将自动刷新
#!/bin/sh
# Get the token
BOT_URL="https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage"
# Set formatting
PARSE_MODE="Markdown"
# Check if all previous steps passed:
if [ $TRAVIS_TEST_RESULT -ne 0 ]; then
build_status=" ❌ Failed 👎"
else
build_status=" ✅ Succeeded 👍"
fi
# Send message function
send_msg () {
curl -s -X POST ${BOT_URL} -d chat_id=$TELEGRAM_CHAT_ID \
-d text="$1" -d parse_mode=${PARSE_MODE}
}
# Call send message with the message
send_msg "
\`----------------------------------------------------------------\`
Build *${build_status}!*
\`Repository 📦: ${TRAVIS_REPO_SLUG}\`
\`Branch 🏷: ${TRAVIS_BRANCH}\`
*Commit Msg 💭:*
_${TRAVIS_COMMIT_MESSAGE}_
[Job Log view here 👉](${TRAVIS_JOB_WEB_URL})
\`----------------------------------------------------------------\`
"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。