Skip to content

Commit 46ecb40

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

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

hack/ci/verify.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ 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"
3030

3131
start_time=$(date +%s)
3232

@@ -38,13 +38,18 @@ try() {
3838
elapsed_time=$(($(date +%s) - $start_time))
3939
TEST_NAME="$title" write_junit $exitCode "$elapsed_time"
4040

41+
local status
4142
if [[ $exitCode -eq 0 ]]; then
4243
echo -e "\n[${elapsed_time}s] SUCCESS :)"
44+
status=OK
4345
else
4446
echo -e "\n[${elapsed_time}s] FAILED."
47+
status=FAIL
4548
EXIT_CODE=1
4649
fi
4750

51+
SUMMARY="$SUMMARY\n$(printf "%-35s %s" "$title" "$status")"
52+
4853
git reset --hard --quiet
4954
git clean --force
5055

@@ -87,4 +92,12 @@ try "Verify Go imports" verify_imports
8792
try "Verify license compatibility" ./hack/verify-licenses.sh
8893
try "Verify boilerplate" ./hack/verify-boilerplate.sh
8994

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

hack/download-tool.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fi
4545
cd tmp
4646

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

5151
UNCOMPRESSED=${UNCOMPRESSED:-false}

0 commit comments

Comments
 (0)