File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 33# returned by the command below:
44# $ xcrun -sdk iphoneos swiftc --version
55
6+ set -euxo pipefail
7+
8+ RUST_TOOLCHAIN=" 1.57.0"
9+
610LLVM_BRANCH=" swift-5.3.2-RELEASE"
711
12+ get_rust_commit_for_toolchain () (
13+ # Yields "" for a toolchain like `x.y.z`, and `mm-dd-yy` for `nightly-mm-dd-yy`
14+ IF_NIGHTLY_DATE_STRIPPED=$( echo " ${RUST_TOOLCHAIN} " | sed -n ' s/^nightly-//p' )
15+ if [ -n " ${IF_NIGHTLY_DATE_STRIPPED} " ]; then
16+ curl " https://static.rust-lang.org/dist/${IF_NIGHTLY_DATE_STRIPPED} /channel-rust-nightly-git-commit-hash.txt"
17+ else
18+ echo " refs/tags/${RUST_TOOLCHAIN} "
19+ fi
20+ )
21+
822# 2. Select the best branch, tag or commit hash from https://github.com/rust-lang/rust
923
10- RUST_BRANCH=" 003d8d3f56848b6f3833340e859b089a09aea36a " # 2021-10-05
24+ RUST_BRANCH=" $( get_rust_commit_for_toolchain ) "
1125
1226# 3. Select a name for the toolchain you want to install as. The toolchain will be installed
1327# under $HOME/.rustup/toolchains/rust-$RUST_TOOLCHAIN
1428
15- RUST_TOOLCHAIN=" ios-arm64-nightly-2021-10-05 "
29+ RUST_TOOLCHAIN=" ios-arm64-${RUST_TOOLCHAIN} "
You can’t perform that action at this time.
0 commit comments