Skip to content

Commit

Permalink
fix(greenkeeper): fix greenkeeper-lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ageorges-nbb committed Aug 4, 2018
1 parent 4bb42be commit 865fee0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ dist: trusty
sudo: false # better for performance

before_install:
- echo $TRAVIS_COMMIT
- echo $TRAVIS_TAG
- echo $TRAVIS_BRANCH
- echo $TRAVIS_BUILD_NUMBER
- echo $TRAVIS_REPO
- AUTHOR_NAME="$(git log -1 $TRAVIS_COMMIT --pretty="%aN")"
- echo $AUTHOR_NAME
- export TZ=Europe/Brussels
- npm i -g npm@5.8.0
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ ]]; then npm i -g greenkeeper-lockfile; fi
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ || ${AUTHOR_NAME} == "greenkeeper[bot]" ]]; then npm i -g greenkeeper-lockfile; fi
# This ensures that we are authenticated without requiring to have an actual .npmrc file within the project
- 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc'

Expand All @@ -18,8 +25,8 @@ install:
# cfr scripts/_travis-fold.sh
- mkdir -p $LOGS_DIR
- touch $LOGS_DIR/build-perf.log
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ ]]; then npm i --no-optional; else npm ci; fi
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ ]]; then npm run install:travis:all; else npm run install:ci:all; fi
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ || ${AUTHOR_NAME} == "greenkeeper[bot]" ]]; then npm i --no-optional; else npm ci; fi
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ || ${AUTHOR_NAME} == "greenkeeper[bot]" ]]; then npm run install:travis:all; else npm run install:ci:all; fi

env:
global:
Expand All @@ -37,7 +44,7 @@ cache:
- $HOME/.npm

before_script:
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ ]]; then greenkeeper-lockfile-update; fi
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ || ${AUTHOR_NAME} == "greenkeeper[bot]" ]]; then greenkeeper-lockfile-update; fi

# Not needed since we use Puppeteer in karma.conf.ci.js
# It downloads Chrome itself and works with or without Travis
Expand All @@ -55,4 +62,4 @@ script:

after_success:
- npm run test:ci:coveralls:combined
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ ]]; then greenkeeper-lockfile-upload; fi
- if [[ ${TRAVIS_BRANCH} =~ ^greenkeeper.*$ || ${AUTHOR_NAME} == "greenkeeper[bot]" ]]; then greenkeeper-lockfile-upload; fi

0 comments on commit 865fee0

Please sign in to comment.