UNPKG

390 Bapplication/x-shView Raw
1#!/bin/bash
2
3set -e
4
5BRANCH=${CIRCLE_BRANCH:=master}
6
7{
8 git describe --tags --exact-match > /dev/null 2>&1 && {
9 echo "Release is already associated to a tag. Skipping..."
10 exit 0
11 }
12} || {
13 echo "Running new release on $BRANCH"
14 npm run release && {
15 git push --follow-tags origin $BRANCH
16 } || {
17 echo "Release aborted as $BRANCH was updated during build."
18 }
19}
20
21exit 0
\No newline at end of file