1 |
|
2 |
|
3 | set -e
|
4 |
|
5 | BRANCH=${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 |
|
21 | exit 0 |
\ | No newline at end of file |