File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
+ TOOLCHAIN=${TOOLCHAIN:- $(date +% Y-% m-% d)}
6
+
5
7
case $1 in
6
8
" prepare" )
7
- TOOLCHAIN=$( date +%Y-%m-%d)
8
-
9
9
echo " => Installing new nightly"
10
10
rustup toolchain install --profile minimal " nightly-${TOOLCHAIN} " # Sanity check to see if the nightly exists
11
11
sed -i " s/\" nightly-.*\" /\" nightly-${TOOLCHAIN} \" /" rust-toolchain
@@ -42,13 +42,16 @@ case $1 in
42
42
git merge sync_from_rust
43
43
;;
44
44
" pull" )
45
+ RUST_VERS=$( curl " https://static.rust-lang.org/dist/$TOOLCHAIN /channel-rust-nightly-git-commit-hash.txt" )
46
+ echo " Pulling $RUST_VERS ($TOOLCHAIN )"
47
+
45
48
cg_clif=$( pwd)
46
49
pushd ../rust
47
- git pull origin master
48
- rust_vers= " $( git rev-parse HEAD ) "
50
+ git fetch origin master
51
+ git checkout " $RUST_VERS "
49
52
git subtree push --prefix=compiler/rustc_codegen_cranelift/ " $cg_clif " sync_from_rust
50
53
popd
51
- git merge sync_from_rust -m " Sync from rust $rust_vers "
54
+ git merge sync_from_rust -m " Sync from rust $RUST_VERS "
52
55
git branch -d sync_from_rust
53
56
;;
54
57
* )
You can’t perform that action at this time.
0 commit comments