Skip to content

Commit

Permalink
chore: 修改 emit-log 换行逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
wang.kangning committed Oct 10, 2023
1 parent f55e3f7 commit 3226c44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions emit-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# 取出 log.txt 的文件内容
log=$(cat log.txt|grep 'New tag:')

# 将换行符替换为两个换行符
log=$(echo "$log"|sed 's/\n/\\n\\n/g')

# 如果 log.txt 为空
if [ -z "$log" ]; then
curl "https://oapi.dingtalk.com/robot/send?access_token=${DING_TOKEN}" \
Expand Down

1 comment on commit 3226c44

@vercel
Copy link

@vercel vercel bot commented on 3226c44 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.