Skip to content

Commit

Permalink
Check for CI in publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Oct 26, 2018
1 parent c662dfb commit 0379c38
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tasks/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ cd packages/react-error-overlay/
npm run build:prod
cd ../..

# Get 2FA
echo "Please enter npm two-factor auth code: "
read otp
# Get 2FA when not CI
otp=""
if [ -z $CI ]; then
echo "Please enter npm two-factor auth code: "
read otp
fi

# Go!
NPM_CONFIG_OTP=$otp ./node_modules/.bin/lerna publish --independent --npm-client=npm "$@"
NPM_CONFIG_OTP="$otp" ./node_modules/.bin/lerna publish --independent --npm-client=npm "$@"

0 comments on commit 0379c38

Please sign in to comment.