LoginSignup
2
0

More than 3 years have passed since last update.

TravisCIでYarnの別バージョンをインストールする。

Posted at

TravisでYarnの別バージョンをインストールする方法について書きました。

.travis.ymlにこれを追加するだけ

.travis.yml
before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version [version]
  - export PATH=$HOME/.yarn/bin:$PATH

cache:
  yarn: true

[version]にインストールしたいYarnのバージョンを入力する。

Stable(安定版)をインストールしたい場合

.travis.yml
before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH=$HOME/.yarn/bin:$PATH

cache:
  yarn: true

Release Candidate(リリース候補)をインストールしたい場合

.travis.yml
before_install:
  - curl curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --rc
  - export PATH=$HOME/.yarn/bin:$PATH

cache:
  yarn: true

Nightly(ナイトリービルド)をインストールしたい場合

.travis.yml
before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --nightly
  - export PATH=$HOME/.yarn/bin:$PATH

cache:
  yarn: true

参考

あとがき

思ったんですけどなんでTravisにインストールされるYarnのバージョンが1.3.2なんでしょうかね...(なぜ安定版の最新がインストールされないのだろうと疑問に思っている。)
理由が何かあるのかな🤔

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0