diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-10-15 11:35:23 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-10-15 14:12:54 +0200 |
| commit | 87a954977bd354a4f6e365644b3bcb85cc3c6f74 (patch) | |
| tree | e28d59fd75ddb32cc44e130ccde559a2e92503f0 /ci/ci-rust-script.sh | |
| parent | ceeb7b97b00b57929c21cce7a161382d51c66651 (diff) | |
| download | mullvadvpn-87a954977bd354a4f6e365644b3bcb85cc3c6f74.tar.xz mullvadvpn-87a954977bd354a4f6e365644b3bcb85cc3c6f74.zip | |
Add --profile minimal to our rustup installs
Diffstat (limited to 'ci/ci-rust-script.sh')
| -rwxr-xr-x | ci/ci-rust-script.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ci/ci-rust-script.sh b/ci/ci-rust-script.sh index 797a9e1008..79e34731af 100755 --- a/ci/ci-rust-script.sh +++ b/ci/ci-rust-script.sh @@ -7,8 +7,14 @@ RUSTFLAGS="--deny unused_imports --deny dead_code" source env.sh "" -rustup update $RUST_TOOLCHAIN_CHANNEL -rustup default $RUST_TOOLCHAIN_CHANNEL +RUST_EXTRA_COMPONENTS="" +if [ "${RUST_TOOLCHAIN_CHANNEL}" = "nightly" ]; then + RUST_EXTRA_COMPONENTS+=" -c rustfmt-preview" +fi + +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + sh -s -- -y --default-toolchain $RUST_TOOLCHAIN_CHANNEL --profile minimal $RUST_EXTRA_COMPONENTS +source $HOME/.cargo/env case "$(uname -s)" in MINGW*|MSYS_NT*) @@ -24,12 +30,8 @@ if [ "${RUST_TOOLCHAIN_CHANNEL}" != "nightly" ]; then fi if [ "${RUST_TOOLCHAIN_CHANNEL}" = "nightly" ]; then - if rustup component add rustfmt-preview; then - rustfmt --version; - cargo fmt -- --check --unstable-features; - else - echo "There seems to not be any rustfmt for the current nighly. Skipping formatting check!" - fi + rustfmt --version; + cargo fmt -- --check --unstable-features; fi if ! git diff-index --quiet HEAD; then |
