From 3fcc8dcd12390edf7a6c4aa7ef57f1a930f75f9f Mon Sep 17 00:00:00 2001 From: Bryan Clark Date: Thu, 8 Jun 2017 11:38:40 -0700 Subject: [PATCH] Switch to use greenkeeper-lockfile-update for yarn.lock file --- bin/update-yarn-lock-file | 31 ------------------------------- circle.yml | 5 ++++- 2 files changed, 4 insertions(+), 32 deletions(-) delete mode 100755 bin/update-yarn-lock-file diff --git a/bin/update-yarn-lock-file b/bin/update-yarn-lock-file deleted file mode 100755 index 9214c97365..0000000000 --- a/bin/update-yarn-lock-file +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# inspired by https://gist.github.com/maxrimue/16e272c4e0b8a8ac9dd5570e180e08c0 - -# this script is only for CircleCI -$CIRCLECI || exit 0 - -if [[ $CIRCLE_BRANCH != *"greenkeeper"* ]]; then - # Not a GreenKeeper Pull Request, aborting - exit 0 -fi - -cd $HOME/$CIRCLE_PROJECT_REPONAME - -# See if commit message includes "update" -git log --name-status HEAD^..HEAD | grep "update" || exit 0 - -# only continue if yarn needs to update -yarn check || exit 0 - -# Run yarn to create/update lockfile -rm yarn.lock -yarn - -# Commit and push yarn.lock file -git config user.email "CircleCI@users.noreply.github.com" -git config user.name "CircleCI" -git config push.default simple - -git add yarn.lock -git commit -m "chore: update yarn.lock" -git push origin $CIRCLE_BRANCH diff --git a/circle.yml b/circle.yml index b985b4777b..3ff34fb3bf 100644 --- a/circle.yml +++ b/circle.yml @@ -16,6 +16,8 @@ checkout: post: - cp configs/ci.json configs/local.json test: + pre: + - greenkeeper-lockfile-update override: - mkdir -p $CIRCLE_TEST_REPORTS/mocha - mkdir -p $CIRCLE_TEST_REPORTS/flow-coverage @@ -36,6 +38,7 @@ test: dependencies: pre: - ./bin/install-yarn + - yarn global add greenkeeper-lockfile@1 cache_directories: - ~/downloads - ~/.cache/yarn @@ -59,4 +62,4 @@ deployment: greenkeeper: branch: /greenkeeper\/.*/ commands: - - ./bin/update-yarn-lock-file + - greenkeeper-lockfile-upload