aboutsummaryrefslogtreecommitdiff
path: root/cc/ci/azure-install-rust.yml
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-08-15 08:12:14 -0700
committerDaniel Mueller <deso@posteo.net>2019-08-15 08:12:14 -0700
commitb766d584b36b78c96e9ef60ec927214c74ede4ab (patch)
treef4032b79b7a51183947e9ccd6e363fe5946dd1d3 /cc/ci/azure-install-rust.yml
parent155f9b7e7f36975240ef93f3daf983b228592a11 (diff)
downloadnitrocli-b766d584b36b78c96e9ef60ec927214c74ede4ab.tar.gz
nitrocli-b766d584b36b78c96e9ef60ec927214c74ede4ab.tar.bz2
Update cc crate to 1.0.40
This change updates the cc crate to version 1.0.40. Import subrepo cc/:cc at 6ad3da7558ec3ccb4dc9c2ed1487fc139469d41e
Diffstat (limited to 'cc/ci/azure-install-rust.yml')
-rw-r--r--cc/ci/azure-install-rust.yml28
1 files changed, 21 insertions, 7 deletions
diff --git a/cc/ci/azure-install-rust.yml b/cc/ci/azure-install-rust.yml
index 118d65e..9c1bae8 100644
--- a/cc/ci/azure-install-rust.yml
+++ b/cc/ci/azure-install-rust.yml
@@ -5,16 +5,30 @@ steps:
if [ "$toolchain" = "" ]; then
toolchain=stable
fi
- curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
- echo "##vso[task.prependpath]$HOME/.cargo/bin"
+ if command -v rustup; then
+ rustup update $toolchain
+ rustup default $toolchain
+ else
+ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
+ echo "##vso[task.prependpath]$HOME/.cargo/bin"
+ fi
displayName: Install rust (unix)
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- - script: |
- IF "%TOOLCHAIN%"=="" (SET TOOLCHAIN=stable-%TARGET%)
- curl -sSf -o rustup-init.exe https://win.rustup.rs
- rustup-init.exe -y --default-toolchain %TOOLCHAIN%
- echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
+ - bash: |
+ set -e
+ toolchain=$TOOLCHAIN
+ if [ "$toolchain" = "" ]; then
+ toolchain=stable-$TARGET
+ fi
+ if command -v rustup; then
+ rustup update --no-self-update $toolchain
+ rustup default $toolchain
+ else
+ curl.exe -sSf -o rustup-init.exe https://win.rustup.rs
+ ./rustup-init.exe -y --default-toolchain $toolchain
+ echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin"
+ fi
displayName: Install rust (windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )