Skip to content

Commit

Permalink
chore(bump): purge cdn cache on new release
Browse files Browse the repository at this point in the history
  • Loading branch information
towerz committed Jan 11, 2018
1 parent 0263e97 commit a1134bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bump
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ npm_publish() {
npm publish
}

purge_cdn_cache() {
echo 'purging cdn cache'
curl -q http://purge.jsdelivr.net/npm/clappr@latest/dist/clappr.min.js
}

send_mail() {
last_tag=$(git log --tags --no-walk --pretty="format:%d" | sed 2q | sed 's/[()]//g' | sed 's/ tag: //' | sed -n 2p)
changelog=$(git log --pretty='%h %s (%an)\n' $last_tag..master)
Expand All @@ -65,6 +70,7 @@ main() {
git_push $1 &&
npm_publish &&
send_mail $1 &&
purge_cdn_cache &&
exit 0

echo "something failed"
Expand Down

0 comments on commit a1134bc

Please sign in to comment.