Use TRAVIS_SECURE_ENV_VARS instead of TRAVIS_PULL_REQUEST.

This commit is contained in:
John-David Dalton
2014-07-11 09:18:35 -07:00
parent 46704724e3
commit ba56f95da8
2 changed files with 3 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ before_install:
- "node ./node_modules/lodash-cli/bin/lodash $BUILD -o ./dist/lodash.$BUILD.js"
script:
- "[ $ISTANBUL == false ] || (nvm install 0.11.11 && $BIN --harmony ./node_modules/istanbul/lib/cli.js cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./dist/lodash.$BUILD.js)"
- "[ $ISTANBUL == true ] && [ $TRAVIS_PULL_REQUEST == false ] && nvm use 0.10 && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage || true"
- "[ $ISTANBUL == true ] && [ $TRAVIS_SECURE_ENV_VARS == true ] && nvm use 0.10 && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage || true"
- "([ $SAUCE_LABS == true ] || [ $ISTANBUL == true ]) || cd ./test"
- "([ $SAUCE_LABS == true ] || [ $ISTANBUL == true ]) || $BIN $OPTION ./test.js ../dist/lodash.$BUILD.js"
- "([ $SAUCE_LABS == true ] || [ $ISTANBUL == true ]) || $BIN $OPTION ./test.js ../dist/lodash.$BUILD.min.js"

View File

@@ -4,8 +4,8 @@
/** Environment shortcut */
var env = process.env;
if (isFinite(env.TRAVIS_PULL_REQUEST)) {
console.log('Skipping Sauce Labs jobs for pull requests');
if (env.TRAVIS_SECURE_ENV_VARS == 'false') {
console.log('Skipping Sauce Labs jobs; secure environment variables are unavailable');
process.exit(0);
}