Created
June 28, 2017 21:35
-
-
Save naganowl/02c0043f6bbf3bbb865543fa603e7dfb to your computer and use it in GitHub Desktop.
Updating `yarn` in CircleCI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
general: | |
artifacts: | |
- "log" | |
- "npm-debug.log" | |
- "yarn-error.log" | |
machine: | |
node: | |
version: 6.10.1 | |
dependencies: | |
pre: | |
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
- mkdir -p ~/.cache/yarn | |
# This seems to have problems with CircleCI cache and only takes ~15 seconds so we could always download. | |
- if [[ ! -e /usr/share/yarn/bin/yarn ]]; then curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt-get update && sudo apt-get install yarn=0.24.6-1; fi | |
cache_directories: | |
- /usr/share/yarn/bin | |
# This is to be specific to the installed `yarn` modules repo. We can leave out `v1` to be more futureproof. | |
- ~/.cache/yarn/v1 | |
override: | |
# We need to update `$PATH` anywhere else this would be used since Circle has problems setting it globally. | |
- /usr/share/yarn/bin/yarn install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment