From 3e26b5eb465f551ff131228aeebcf6fa14367100 Mon Sep 17 00:00:00 2001 From: Hsiao-nan Cheung Date: Fri, 2 Aug 2019 19:25:25 +0800 Subject: [PATCH] rustup: Add desc, mod url and fix license (#285) Co-Authored-By: linsui <36977733+linsui@users.noreply.github.com> --- bucket/rustup-msvc.json | 50 +++++++++++++++++++++++++++++++++++++++++ bucket/rustup.json | 44 ++++++++++++++++++++++++------------ 2 files changed, 80 insertions(+), 14 deletions(-) create mode 100644 bucket/rustup-msvc.json diff --git a/bucket/rustup-msvc.json b/bucket/rustup-msvc.json new file mode 100644 index 0000000000..77b089d5ae --- /dev/null +++ b/bucket/rustup-msvc.json @@ -0,0 +1,50 @@ +{ + "homepage": "https://rustup.rs", + "version": "1.18.3", + "license": "MIT|Apache-2.0", + "description": "Manage multiple rust installations with ease", + "architecture": { + "64bit": { + "url": "https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe", + "hash": "9da383c67914eef4b8f880cb8e6d75f623f1261a08ed791a0404c3ebca8c3a5a" + }, + "32bit": { + "url": "https://static.rust-lang.org/rustup/dist/i686-pc-windows-msvc/rustup-init.exe", + "hash": "9b15c26905d4505ab77e000750aa3aedeb909507485c5e5901b6ad7de9d42e2d" + } + }, + "persist": [ + ".cargo", + ".rustup" + ], + "env_add_path": ".cargo\\bin", + "env_set": { + "CARGO_HOME": "$persist_dir\\.cargo", + "RUSTUP_HOME": "$persist_dir\\.rustup" + }, + "installer": { + "script": [ + "[Environment]::SetEnvironmentVariable('CARGO_HOME', \"$persist_dir\\.cargo\", 'Process')", + "[Environment]::SetEnvironmentVariable('RUSTUP_HOME', \"$persist_dir\\.rustup\", 'Process')", + "Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args '-y --no-modify-path' | Out-Null" + ] + }, + "checkver": { + "url": "https://raw.githubusercontent.com/rust-lang-nursery/rustup.rs/master/Cargo.toml", + "regex": "version = \"([\\d.]+)\"" + }, + "autoupdate": { + "architecture": { + "64bit": { + "url": "https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe" + }, + "32bit": { + "url": "https://static.rust-lang.org/rustup/dist/i686-pc-windows-msvc/rustup-init.exe" + } + }, + "hash": { + "url": "$url.sha256" + } + }, + "notes": "To use the MSVC ABI without Visual Studio 2015 (or higher) installed, you will need the Visual Studio 2017 Build Tools: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017" +} diff --git a/bucket/rustup.json b/bucket/rustup.json index e8c6f5bdf5..a6d8128bc4 100644 --- a/bucket/rustup.json +++ b/bucket/rustup.json @@ -1,15 +1,17 @@ { + "homepage": "https://rustup.rs", "version": "1.18.3", - "license": "MIT", - "hash": "9b15c26905d4505ab77e000750aa3aedeb909507485c5e5901b6ad7de9d42e2d", - "homepage": "https://github.com/rust-lang-nursery/rustup.rs", - "checkver": { - "url": "https://raw.githubusercontent.com/rust-lang-nursery/rustup.rs/master/Cargo.toml", - "re": "version = \"(\\d+\\.\\d+\\.\\d+)\"" - }, - "url": "https://win.rustup.rs/#/rustup-init.exe", - "autoupdate": { - "url": "https://win.rustup.rs/#/rustup-init.exe" + "license": "MIT|Apache-2.0", + "description": "Manage multiple rust installations with ease", + "architecture": { + "64bit": { + "url": "https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe", + "hash": "18f8d01a15d821617348e640da95b51a1642adf7ecccdc49b1d0c8df7229a3cf" + }, + "32bit": { + "url": "https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe", + "hash": "9cbacf99f8308b95f7944e7e9d171b3bc3c1fa77242a1ce78ba7d09761a94807" + } }, "persist": [ ".cargo", @@ -22,13 +24,27 @@ }, "installer": { "script": [ - "# Create environment variables for this process", "[Environment]::SetEnvironmentVariable('CARGO_HOME', \"$persist_dir\\.cargo\", 'Process')", "[Environment]::SetEnvironmentVariable('RUSTUP_HOME', \"$persist_dir\\.rustup\", 'Process')", - "", - "# Install Rustup", - "& \"$dir\\rustup-init.exe\" -y --no-modify-path --default-toolchain stable-gnu" + "Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args '-y --no-modify-path' | Out-Null" ] }, + "checkver": { + "url": "https://raw.githubusercontent.com/rust-lang-nursery/rustup.rs/master/Cargo.toml", + "regex": "version = \"([\\d.]+)\"" + }, + "autoupdate": { + "architecture": { + "64bit": { + "url": "https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe" + }, + "32bit": { + "url": "https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe" + } + }, + "hash": { + "url": "$url.sha256" + } + }, "notes": "To use the MSVC ABI without Visual Studio 2015 (or higher) installed, you will need the Visual Studio 2017 Build Tools: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017" }