File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 55 exit 1
66fi
77
8- url=https://api.github.com/repos/FEMessage/vue-sfc-cli/releases/latest
8+ ORG_NAME=$( echo " $TRAVIS_REPO_SLUG " | cut -d ' /' -f 1)
9+ REPO_NAME=$( echo " $TRAVIS_REPO_SLUG " | cut -d ' /' -f 2)
10+
11+ git remote add github https://$GITHUB_TOKEN @github.com/$TRAVIS_REPO_SLUG .git > /dev/null 2>&1
12+ git push github HEAD:master --follow-tags
13+
14+ GREN_GITHUB_TOKEN=$GITHUB_TOKEN yarn release
15+
16+ url=https://api.github.com/repos/$TRAVIS_REPO_SLUG /releases/latest
917resp_tmp_file=resp.tmp
1018
1119curl -H " Authorization: token $GITHUB_TOKEN " $url > $resp_tmp_file
@@ -14,7 +22,7 @@ html_url=$(sed -n 5p $resp_tmp_file | sed 's/\"html_url\"://g' | awk -F '"' '{pr
1422body=$( grep body < $resp_tmp_file | sed ' s/\"body\"://g;s/\"//g' )
1523version=$( echo $html_url | awk -F ' /' ' {print $NF}' )
1624
17- msg=' {"msgtype": "markdown", "markdown": {"title": "vue-sfc-cli更新 ", "text": "@所有人\n# [vue-sfc-cli (' $version ' )](' $html_url ' )\n' $body ' "}}'
25+ msg=' {"msgtype": "markdown", "markdown": {"title": "' $REPO_NAME ' 更新 ", "text": "@所有人\n# [' $REPO_NAME ' (' $version ' )](' $html_url ' )\n' $body ' "}}'
1826
1927curl -X POST https://oapi.dingtalk.com/robot/send\? access_token\= $DINGTALK_ROBOT_TOKEN -H ' Content-Type: application/json' -d " $msg "
2028
Original file line number Diff line number Diff line change 55 exit 1
66fi
77
8- ORG_NAME=$( cut -d ' /' -f 1 <<< " $TRAVIS_REPO_SLUG" )
9-
10- REPO_NAME=$( cut -d ' /' -f 2 <<< " $TRAVIS_REPO_SLUG" )
8+ ORG_NAME=$( echo " $TRAVIS_REPO_SLUG " | cut -d ' /' -f 1)
9+ REPO_NAME=$( echo " $TRAVIS_REPO_SLUG " | cut -d ' /' -f 2)
1110
1211git remote add github https://$GITHUB_TOKEN @github.com/$TRAVIS_REPO_SLUG .git > /dev/null 2>&1
1312git push github HEAD:master --follow-tags
@@ -23,7 +22,7 @@ html_url=$(sed -n 5p $resp_tmp_file | sed 's/\"html_url\"://g' | awk -F '"' '{pr
2322body=$( grep body < $resp_tmp_file | sed ' s/\"body\"://g;s/\"//g' )
2423version=$( echo $html_url | awk -F ' /' ' {print $NF}' )
2524
26- msg=' {"msgtype": "markdown", "markdown": {"title": "$REPO_NAME更新 ", "text": "@所有人\n# [$REPO_NAME(' $version ' )](' $html_url ' )\n' $body ' "}}'
25+ msg=' {"msgtype": "markdown", "markdown": {"title": "' $REPO_NAME ' 更新 ", "text": "@所有人\n# [' $REPO_NAME ' (' $version ' )](' $html_url ' )\n' $body ' "}}'
2726
2827curl -X POST https://oapi.dingtalk.com/robot/send\? access_token\= $DINGTALK_ROBOT_TOKEN -H ' Content-Type: application/json' -d " $msg "
2928
You can’t perform that action at this time.
0 commit comments