Skip to content

Commit 78545bc

Browse files
committed
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.
1 parent a1ec8b7 commit 78545bc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

ci/check_diff.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,28 @@ function compile_rustfmt() {
123123
git remote add feature $REMOTE_REPO
124124
git fetch feature $FEATURE_BRANCH
125125

126+
CARGO_VERSON=$(cargo --version)
127+
echo -e "\ncompiling with $CARGO_VERSON\n"
128+
129+
echo "Building rustfmt from src"
126130
cargo build -q --release --bin rustfmt && cp target/release/rustfmt $1/rustfmt
131+
127132
if [ -z "$OPTIONAL_COMMIT_HASH" ] || [ "$FEATURE_BRANCH" = "$OPTIONAL_COMMIT_HASH" ]; then
128133
git switch $FEATURE_BRANCH
129134
else
130135
git switch $OPTIONAL_COMMIT_HASH --detach
131136
fi
137+
138+
echo "Building feature rustfmt from src"
132139
cargo build -q --release --bin rustfmt && cp target/release/rustfmt $1/feature_rustfmt
140+
133141
RUSFMT_BIN=$1/rustfmt
142+
RUSTFMT_VERSION=$($RUSFMT_BIN --version)
143+
echo -e "\nRUSFMT_BIN $RUSTFMT_VERSION\n"
144+
134145
FEATURE_BIN=$1/feature_rustfmt
146+
FEATURE_VERSION=$($FEATURE_BIN --version)
147+
echo -e "FEATURE_BIN $FEATURE_VERSION\n"
135148
}
136149

137150
# Check the diff for running rustfmt and the feature branch on all the .rs files in the repo.
@@ -164,7 +177,7 @@ function check_repo() {
164177
STATUSES+=($?)
165178
set -e
166179

167-
echo "removing tmp_dir $tmp_dir"
180+
echo -e "removing tmp_dir $tmp_dir\n\n"
168181
rm -rf $tmp_dir
169182
cd $WORKDIR
170183
}

0 commit comments

Comments
 (0)