From 764e66aa32adf4fbf07ba9b83b55199700df915a Mon Sep 17 00:00:00 2001 From: "wang.kangning" Date: Mon, 4 Sep 2023 13:40:05 +0800 Subject: [PATCH] test --- emit-log.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/emit-log.sh b/emit-log.sh index 11b156f..70c28d2 100755 --- a/emit-log.sh +++ b/emit-log.sh @@ -3,6 +3,8 @@ # 取出 log.txt 的文件内容 log=$(cat log.txt|grep 'New tag:') +echo $log + # 如果 log.txt 为空 if [ -z "$log" ]; then curl 'https://oapi.dingtalk.com/robot/send?access_token=${DING_TOKEN}' \ @@ -13,6 +15,8 @@ fi # 如果 log.txt 不为空,则将 log 作为消息发出去,需要将 log 的换行符替换为 \n log=${log//$'\n'/\\n} +echo $log +echo $DING_TOKEN curl 'https://oapi.dingtalk.com/robot/send?access_token=${DING_TOKEN}' \ -H 'Content-Type: application/json' \ -d '{"msgtype": "markdown","markdown": {"title":"orca-fe发布通知","text":"### @orca-fe/vite-plugins\n流水线结束,以下模块已发布:\n'"$log"'"}}'