diff --git a/script/ci/cargo-clean-on-new-rustc-version.sh b/script/ci/cargo-clean-on-new-rustc-version.sh index 949f070b996..38d56f89db5 100755 --- a/script/ci/cargo-clean-on-new-rustc-version.sh +++ b/script/ci/cargo-clean-on-new-rustc-version.sh @@ -3,7 +3,7 @@ set -e manual_stamp_file=target/ci_manual_stamp -manual_stamp=0 # Change this to force a clean build on CI +manual_stamp=1 # Change this to force a clean build on CI if [ -f $manual_stamp_file ]; then if echo "$manual_stamp" | cmp -s $manual_stamp_file -; then @@ -11,10 +11,15 @@ if [ -f $manual_stamp_file ]; then else echo "A clean build has been requested, running cargo clean" cargo clean - # The target/ directory is now gone, and the messages below will not be printed fi +else + echo "Existing stamp not found, running cargo clean" + cargo clean fi +# If `cargo clean` was run above, then the target/ directory is now +# gone and the messages below will not be printed + stamp_file=target/rustc_version_stamp current_version=$(rustc --version)