From 9e99ec5f3212a3968151b4ccbdedc2d114783950 Mon Sep 17 00:00:00 2001 From: Hector Ramos Date: Tue, 12 Jun 2018 17:36:52 -0700 Subject: [PATCH 1/4] Skip yarn install on metro bump commits These "Bump metro@X.X" commits will fail tests on Circle because the metro package is uploaded by Circle itself from facebook/metro *after* this very same commit is processed, and hence the package is not yet available on npm. --- .circleci/config.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 185be9135eb451..638d80dee8c21f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -122,8 +122,13 @@ aliases: command: source scripts/android-setup.sh && getAndroidNDK - &yarn - | - yarn install --non-interactive --cache-folder ~/.cache/yarn + name: Run Yarn + command: | + # Skip yarn install on metro bump commits as the package is not yet + # available on npm + if [[ `echo $GIT_COMMIT_DESC | grep -c "Bump metro@"` -eq 0]]; then + yarn install --non-interactive --cache-folder ~/.cache/yarn + fi - &install-yarn name: Install Yarn @@ -304,6 +309,8 @@ aliases: defaults: &defaults working_directory: ~/react-native + environment: + - GIT_COMMIT_DESC: git log --format=oneline -n 1 $CIRCLE_SHA1 js_defaults: &js_defaults <<: *defaults @@ -337,6 +344,7 @@ jobs: checkout_code: <<: *js_defaults steps: + - - checkout - run: *setup-artifacts From dcdf11bf890378dba192a57a8cdc069b7a971169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= <165856+hramos@users.noreply.github.com> Date: Tue, 12 Jun 2018 17:42:27 -0700 Subject: [PATCH 2/4] Update config.yml --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 638d80dee8c21f..c14d4c966f3b7f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -344,7 +344,6 @@ jobs: checkout_code: <<: *js_defaults steps: - - - checkout - run: *setup-artifacts From 1627d6c5625700387b269c14d832c6d71459a851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= <165856+hramos@users.noreply.github.com> Date: Fri, 15 Jun 2018 06:59:44 -0700 Subject: [PATCH 3/4] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c14d4c966f3b7f..dc71e6742ae13b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -126,7 +126,7 @@ aliases: command: | # Skip yarn install on metro bump commits as the package is not yet # available on npm - if [[ `echo $GIT_COMMIT_DESC | grep -c "Bump metro@"` -eq 0]]; then + if [[ $(echo "$GIT_COMMIT_DESC" | grep -c "Bump metro@") -eq 0]]; then yarn install --non-interactive --cache-folder ~/.cache/yarn fi From 6b7cb4b5b87f4f6a3ac67caf0cbab820a863694a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= <165856+hramos@users.noreply.github.com> Date: Fri, 15 Jun 2018 09:57:28 -0700 Subject: [PATCH 4/4] Fix syntax error --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dc71e6742ae13b..17cc0331b5e765 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -126,7 +126,7 @@ aliases: command: | # Skip yarn install on metro bump commits as the package is not yet # available on npm - if [[ $(echo "$GIT_COMMIT_DESC" | grep -c "Bump metro@") -eq 0]]; then + if [[ $(echo "$GIT_COMMIT_DESC" | grep -c "Bump metro@") -eq 0 ]]; then yarn install --non-interactive --cache-folder ~/.cache/yarn fi