]> git.lizzy.rs Git - rust.git/blobdiff - appveyor.yml
rustup https://github.com/rust-lang/rust/pull/61836/
[rust.git] / appveyor.yml
index 94f9500ab85f253205072422bd11d578b5b364fc..2d8704a703bcd6655e7fb2c30215d1306dfec939 100644 (file)
@@ -7,16 +7,24 @@ environment:
         #- TARGET: x86_64-pc-windows-gnu
         - TARGET: x86_64-pc-windows-msvc
 
+branches:
+    # Only build AppVeyor on r+, try and the master branch
+    only:
+      - auto
+      - try
+      - master
+
 install:
     - curl -sSf -o rustup-init.exe https://win.rustup.rs/
     - rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly
     - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
-    # https://support.microsoft.com/en-us/help/2524009/error-running-command-shell-scripts-that-include-parentheses
-    - if defined GITHUB_TOKEN del rust-toolchain
-    - if defined GITHUB_TOKEN (cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed")
-    - if defined GITHUB_TOKEN rustup-toolchain-install-master -f -n master --github-token %GITHUB_TOKEN%
-    - if defined GITHUB_TOKEN rustup default master
-    - if defined GITHUB_TOKEN set PATH=%PATH%;C:\Users\appveyor\.rustup\toolchains\master\bin
+    - git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}' >rustc-hash.txt
+    - set /p RUSTC_HASH=<rustc-hash.txt
+    - del rust-toolchain
+    - cargo install rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
+    - rustup-toolchain-install-master %RUSTC_HASH% -f -n master
+    - rustup default master
+    - set PATH=%PATH%;C:\Users\appveyor\.rustup\toolchains\master\bin
     - rustc -V
     - cargo -V