Skip to content

Commit

Permalink
Check if logged to npm before publish (#153)
Browse files Browse the repository at this point in the history
Co-authored-by: Anushkafka <[email protected]>
  • Loading branch information
anushkafka and Anushkafka authored Dec 19, 2022
1 parent 3eadeb5 commit e1cabd0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ if [[ "$(yarn config get @zendesk:registry)" == *'jfrog'* ]]; then
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'
Expand Down

0 comments on commit e1cabd0

Please sign in to comment.