Skip to content

Commit 3ab0e61

Browse files
committed
Merge branch 'update-rust-setup'
2 parents bfbf7da + 5939c0f commit 3ab0e61

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

scripts/setup-rust

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ANDROID_COMPONENTS="rust-analyzer"
1616
IOS_TARGETS="aarch64-apple-ios-sim aarch64-apple-ios x86_64-apple-ios"
1717
IOS_COMPONENTS="rust-analyzer"
1818

19-
WINDOWS_TARGETS="x86_64-pc-windows-msvc x86_64-pc-windows-gnu i686-pc-windows-msvc"
19+
WINDOWS_TARGETS="x86_64-pc-windows-msvc aarch64-pc-windows-msvc i686-pc-windows-msvc"
2020
WINDOWS_COMPONENTS="rust-analyzer"
2121

2222
LINUX_TARGETS="aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu"

scripts/setup-rust-post-checkout

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ if [[ ! -f "$SETUP_RUST_SCRIPT" ]]; then
1313
exit 0
1414
fi
1515

16-
if [[ -z ${MULLVAD_SETUP_PLATFORM+x} ]]; then
17-
echo "MULLVAD_SETUP_PLATFORM is not set, must be set to one of the following: " >&2
18-
echo "\`android\`, \`ios\`, \`windows\`, \`linux\`, \`macos\`" >&2
19-
exit 1
16+
if [[ -z "$MULLVAD_SETUP_PLATFORM" ]]; then
17+
case "$(uname -s)" in
18+
Linux) MULLVAD_SETUP_PLATFORM="linux" ;;
19+
Darwin) MULLVAD_SETUP_PLATFORM="macos" ;;
20+
MINGW*|CYGWIN*|MSYS*) MULLVAD_SETUP_PLATFORM="windows" ;;
21+
*)
22+
echo "Unable to detect current platform, MULLVAD_SETUP_PLATFORM must be set to one of: " >&2
23+
echo "\`android\`, \`ios\`, \`windows\`, \`linux\`, \`macos\`" >&2
24+
exit 1
25+
;;
26+
esac
2027
fi
2128

2229
git diff-tree --exit-code "$1".."$2" --quiet -- rust-toolchain.toml

0 commit comments

Comments
 (0)