Skip to content

Commit 29c2ea3

Browse files
author
levy
committed
chore(ci): 钉钉通知时带上自身的版本号
1 parent 51929ef commit 29c2ea3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notify.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ curl -H "Authorization: token $GITHUB_TOKEN" $url > $resp_tmp_file
1212

1313
html_url=$(sed -n 5p $resp_tmp_file | sed 's/\"html_url\"://g' | awk -F '"' '{print $2}')
1414
body=$(grep body < $resp_tmp_file | sed 's/\"body\"://g;s/\"//g')
15+
version=$(echo $html_url | awk -F '/' '{print $NF}')
1516

16-
msg='{"msgtype": "markdown", "markdown": {"title": "vue-sfc-cli更新", "text": "@所有人\n# [vue-sfc-cli]('$html_url')\n'$body'"}}'
17+
msg='{"msgtype": "markdown", "markdown": {"title": "vue-sfc-cli更新", "text": "@所有人\n# [vue-sfc-cli('$version')]('$html_url')\n'$body'"}}'
1718

1819
curl -X POST https://oapi.dingtalk.com/robot/send\?access_token\=$DINGTALK_ROBOT_TOKEN -H 'Content-Type: application/json' -d "$msg"
1920

0 commit comments

Comments
 (0)