diff options
| author | Yacin Tmimi <yacintmimi@gmail.com> | 2023-07-11 20:57:56 -0400 |
|---|---|---|
| committer | Caleb Cartwright <calebcartwright@users.noreply.github.com> | 2023-11-01 20:21:47 -0500 |
| commit | b446e8eee52f0edca8cdf775d323d8c7a9f54af2 (patch) | |
| tree | 3c1cb2c9f8f3d7116193afed56a45e5dd19f5a41 | |
| parent | 8d2c4157e6ce88b40d9a49d837b2e600d47cd05c (diff) | |
| download | rust-b446e8eee52f0edca8cdf775d323d8c7a9f54af2.tar.gz rust-b446e8eee52f0edca8cdf775d323d8c7a9f54af2.zip | |
update diff-check logging
These changes mostly improve logging out the cargo version and version of the two rustfmt binaries that are compiled. Some other minor logging changes were made as well to add some whitespace to improve visual clarity when looking at the logs in the GitHub Actions console.
| -rwxr-xr-x | ci/check_diff.sh | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/ci/check_diff.sh b/ci/check_diff.sh index 50c58b1f492..66b4b26a88c 100755 --- a/ci/check_diff.sh +++ b/ci/check_diff.sh @@ -114,15 +114,28 @@ function compile_rustfmt() { git remote add feature $REMOTE_REPO git fetch feature $FEATURE_BRANCH - cargo build --release --bin rustfmt && cp target/release/rustfmt $1/rustfmt + CARGO_VERSON=$(cargo --version) + echo -e "\ncompiling with $CARGO_VERSON\n" + + echo "Building rustfmt from src" + cargo build -q --release --bin rustfmt && cp target/release/rustfmt $1/rustfmt + if [ -z "$OPTIONAL_COMMIT_HASH" ] || [ "$FEATURE_BRANCH" = "$OPTIONAL_COMMIT_HASH" ]; then git switch $FEATURE_BRANCH else git switch $OPTIONAL_COMMIT_HASH --detach fi - cargo build --release --bin rustfmt && cp target/release/rustfmt $1/feature_rustfmt + + echo "Building feature rustfmt from src" + cargo build -q --release --bin rustfmt && cp target/release/rustfmt $1/feature_rustfmt + RUSFMT_BIN=$1/rustfmt + RUSTFMT_VERSION=$($RUSFMT_BIN --version) + echo -e "\nRUSFMT_BIN $RUSTFMT_VERSION\n" + FEATURE_BIN=$1/feature_rustfmt + FEATURE_VERSION=$($FEATURE_BIN --version) + echo -e "FEATURE_BIN $FEATURE_VERSION\n" } # Check the diff for running rustfmt and the feature branch on all the .rs files in the repo. @@ -155,7 +168,7 @@ function check_repo() { STATUSES+=($?) set -e - echo "removing tmp_dir $tmp_dir" + echo -e "removing tmp_dir $tmp_dir\n\n" rm -rf $tmp_dir cd $WORKDIR } |
