From 0bbac18cf0ac7434e231cc90604db011602246b8 Mon Sep 17 00:00:00 2001 From: Dulmandakh Date: Wed, 23 May 2018 13:51:57 -0700 Subject: [PATCH] circle ci: yarn cache uses package.json checksum as a key Summary: To better utilize Circle CI caching, yarn cache will use package.json file checksum as key in addition to arch, because in most cases yarn cache will be updated if package.json updates. Circle CI sample apps use yarn.lock checksum as yarn cache key, but react-native don't have yarn.lock in the repo, so it's best to use package.json instead. Closes https://github.com/facebook/react-native/pull/19395 Differential Revision: D8125405 Pulled By: hramos fbshipit-source-id: 5c7aa312231cc0b42bc502a5177bb84e31bcd305 --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ede2ebf81cf59..7b78ebf8f522e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,11 +2,12 @@ aliases: # Cache Management - &restore-yarn-cache keys: + - v1-yarn-cache-{{ arch }}-{{ checksum "package.json" }} - v1-yarn-cache-{{ arch }} - &save-yarn-cache paths: - ~/.cache/yarn - key: v1-yarn-cache-{{ arch }} + key: v1-yarn-cache-{{ arch }}-{{ checksum "package.json" }} - &restore-node-modules keys: