Skip to content

Commit 19d1d55

Browse files
Timernate770
authored andcommitted
Check for CI in publish
1 parent a3101fb commit 19d1d55

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tasks/publish.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ cd packages/react-error-overlay/
3636
npm run build:prod
3737
cd ../..
3838

39-
# Get 2FA
40-
echo "Please enter npm two-factor auth code: "
41-
read otp
39+
# Get 2FA when not CI
40+
otp=""
41+
if [ -z $CI ]; then
42+
echo "Please enter npm two-factor auth code: "
43+
read otp
44+
fi
4245

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

0 commit comments

Comments
 (0)