mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
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.
This commit is contained in:
parent
ad7845db41
commit
cac3b88405
1 changed files with 11 additions and 1 deletions
12
circle.yml
12
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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue