From ad7845db417305dd6ecc0fd249a0ea525da4623c Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Tue, 31 Oct 2017 12:21:56 +0200 Subject: [PATCH 1/2] Update Node to the latest LTS release --- circle.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index b7b916c3..4d2c4246 100644 --- a/circle.yml +++ b/circle.yml @@ -2,7 +2,7 @@ machine: node: - version: 6.11.4 + version: 6.11.5 environment: PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" diff --git a/package.json b/package.json index 6f1c133d..d80a8de7 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "trailingComma": "es5" }, "engines": { - "node": "6.11.4", + "node": "6.11.5", "yarn": "^1.2.1" } } From cac3b884056d4d79fb89dfe391c40e5f2d05163b Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Tue, 31 Oct 2017 12:22:11 +0200 Subject: [PATCH 2/2] Install the specified version of Yarn CircleCI has a default version of Yarn, but the version cannot be specified. This is why we have to install our own version of Yarn that matches the one in package.json. This prevents yarn failing with a mismatched version error. --- circle.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 4d2c4246..9e0828f2 100644 --- a/circle.yml +++ b/circle.yml @@ -4,13 +4,23 @@ machine: node: version: 6.11.5 environment: - PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" + YARN_VERSION: 1.2.1 + PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" dependencies: + pre: + - | + if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then + echo "Downloading and installing Yarn" + curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION + else + echo "The correct version of Yarn is already installed" + fi override: - yarn cache_directories: - ~/.cache/yarn + - ~/.yarn test: pre: