Skip to content

Commit 68cf4cb

Browse files
committed
If no manual stamp is found, then run cargo clean anyway
Since the beta and stable channels are not currently saving their caches, we run `cargo clean` if no file is found.
1 parent 37c99bb commit 68cf4cb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

script/ci/cargo-clean-on-new-rustc-version.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ if [ -f $manual_stamp_file ]; then
1111
else
1212
echo "A clean build has been requested, running cargo clean"
1313
cargo clean
14-
# The target/ directory is now gone, and the messages below will not be printed
1514
fi
15+
else
16+
echo "Existing stamp not found, running cargo clean"
17+
cargo clean
1618
fi
1719

20+
# If `cargo clean` was run above, then the target/ directory is now
21+
# gone and the messages below will not be printed
22+
1823
stamp_file=target/rustc_version_stamp
1924
current_version=$(rustc --version)
2025

0 commit comments

Comments
 (0)