Skip to content

Commit 0e3a1fd

Browse files
committed
improve readability
On-behalf-of: @SAP [email protected]
1 parent cfb311b commit 0e3a1fd

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

hack/ci/verify.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ cd $(dirname $0)/../..
2020
source hack/lib.sh
2121

2222
EXIT_CODE=0
23+
SUMMARY=
2324

2425
try() {
2526
local title="$1"
2627
shift
2728

2829
heading "$title"
29-
echo -e "$@\n"
30+
echo
3031

3132
start_time=$(date +%s)
3233

@@ -38,13 +39,18 @@ try() {
3839
elapsed_time=$(($(date +%s) - $start_time))
3940
TEST_NAME="$title" write_junit $exitCode "$elapsed_time"
4041

42+
local status
4143
if [[ $exitCode -eq 0 ]]; then
4244
echo -e "\n[${elapsed_time}s] SUCCESS :)"
45+
status=OK
4346
else
4447
echo -e "\n[${elapsed_time}s] FAILED."
48+
status=FAIL
4549
EXIT_CODE=1
4650
fi
4751

52+
SUMMARY="$SUMMARY\n$(printf "%-35s %s" "$title" "$status")"
53+
4854
git reset --hard --quiet
4955
git clean --force
5056

@@ -87,4 +93,12 @@ try "Verify Go imports" verify_imports
8793
try "Verify license compatibility" ./hack/verify-licenses.sh
8894
try "Verify boilerplate" ./hack/verify-boilerplate.sh
8995

96+
echo
97+
echo "SUMMARY"
98+
echo "======="
99+
echo
100+
echo "Check Result"
101+
echo -n "------------------------------------------"
102+
echo -e "$SUMMARY"
103+
90104
exit $EXIT_CODE

hack/download-tool.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ fi
4444
mkdir -p tmp
4545
cd tmp
4646

47-
echo "Downloading $BINARY" >&2
48-
curl --fail -LO "$URL"
47+
echo "Downloading $BINARY version $VERSION" >&2
48+
curl --fail --silent -LO "$URL"
4949
archive="$(ls)"
5050

5151
UNCOMPRESSED=${UNCOMPRESSED:-false}
@@ -71,4 +71,4 @@ fi
7171
rm -rf tmp
7272
echo "$VERSION" > "$versionFile"
7373

74-
echo "Installed $BINARY version $VERSION." >&2
74+
echo "Installed at _tools/$BINARY." >&2

0 commit comments

Comments
 (0)