-
Notifications
You must be signed in to change notification settings - Fork 18
/
release.sh
executable file
·36 lines (29 loc) · 965 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
# exit when any command fails
set -e
if [[ "$(yarn config get @zendesk:registry)" == *'jfrog'* ]]; then
# https://github.com/yarnpkg/yarn/issues/5310
printf 'Please remove Artifactory configurations from ~/.npmrc first\n'
exit 1
fi
if ! npm whoami &> /dev/null; then
printf 'Please make sure you are logged into NPM\n'
exit 1
fi
if [[ "$(git branch --show-current)" != "master" ]]; then
printf 'Your are not on master branch at the moment. Really continue? [y/n] '
read -n1 -r; printf '\n'
if [[ "$REPLY" != 'y' ]]; then
printf 'Aborted\n'
exit 0
fi
fi
echo '🔄 Generate tag, update docs and changelog'
yarn install
# TODO: move custom docs part of app.md etc to another place,
# so we can continue to run generate_dev_docs.sh script
# ./scripts/generate_dev_docs.sh
# Remove beta once we are out of it
npx lerna publish --conventional-commits --yes --preid 'beta'
echo "✅ Done"
exit 0