Skip to content

Commit b0bf250

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 090a499 commit b0bf250

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
@@ -122,15 +122,28 @@ function compile_rustfmt() {
122122
git remote add feature $REMOTE_REPO
123123
git fetch feature $FEATURE_BRANCH
124124

125+
CARGO_VERSON=$(cargo --version)
126+
echo -e "\ncompiling with $CARGO_VERSON\n"
127+
128+
echo "Building rustfmt from src"
125129
cargo build -q --release --bin rustfmt && cp target/release/rustfmt $1/rustfmt
130+
126131
if [ -z "$OPTIONAL_COMMIT_HASH" ] || [ "$FEATURE_BRANCH" = "$OPTIONAL_COMMIT_HASH" ]; then
127132
git switch $FEATURE_BRANCH
128133
else
129134
git switch $OPTIONAL_COMMIT_HASH --detach
130135
fi
136+
137+
echo "Building feature rustfmt from src"
131138
cargo build -q --release --bin rustfmt && cp target/release/rustfmt $1/feature_rustfmt
139+
132140
RUSFMT_BIN=$1/rustfmt
141+
RUSTFMT_VERSION=$($RUSFMT_BIN --version)
142+
echo -e "\nRUSFMT_BIN $RUSTFMT_VERSION\n"
143+
133144
FEATURE_BIN=$1/feature_rustfmt
145+
FEATURE_VERSION=$($FEATURE_BIN --version)
146+
echo -e "FEATURE_BIN $FEATURE_VERSION\n"
134147
}
135148

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

166-
echo "removing tmp_dir $tmp_dir"
179+
echo -e "removing tmp_dir $tmp_dir\n\n"
167180
rm -rf $tmp_dir
168181
cd $WORKDIR
169182
}

0 commit comments

Comments
 (0)