diff options
| author | Lzu Tao <taolzu@gmail.com> | 2020-01-06 19:33:27 +0700 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2020-01-07 01:51:49 +0700 |
| commit | abd76076b0574e3056824ac6cd38f288836a0f19 (patch) | |
| tree | 7a64ee1ef66fa72d4fbda6c1a9fe9dda8f4329d2 | |
| parent | e8642c7a2900bed28003a98d4db8b62290ac802f (diff) | |
| download | rust-abd76076b0574e3056824ac6cd38f288836a0f19.tar.gz rust-abd76076b0574e3056824ac6cd38f288836a0f19.zip | |
build: Use rustfmt from lastest nightly that contains it
| -rw-r--r-- | .travis.yml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index bbf084259ff..eac878dee51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,11 @@ install: - | if [[ -z ${INTEGRATION} ]]; then if ! rustup component add rustfmt; then - cargo install --git https://github.com/rust-lang/rustfmt --bin rustfmt + TARGET=$(rustc -Vv | awk '/host/{print $2}') + NIGHTLY=$(curl -s "https://rust-lang.github.io/rustup-components-history/${TARGET}/rustfmt") + curl -sSL "https://static.rust-lang.org/dist/${NIGHTLY}/rustfmt-nightly-${TARGET}.tar.xz" | \ + tar -xJf - --strip-components=3 -C ~/.cargo/bin + rm -rf ~/.cargo/bin/doc fi if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then . $HOME/.nvm/nvm.sh |
