Skip to content

Commit

Permalink
improve readability
Browse files Browse the repository at this point in the history
On-behalf-of: @SAP [email protected]
  • Loading branch information
xrstf committed Jan 9, 2025
1 parent cfb311b commit fda5871
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion hack/ci/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ cd $(dirname $0)/../..
source hack/lib.sh

EXIT_CODE=0
SUMMARY=

try() {
local title="$1"
shift

heading "$title"
echo -e "$@\n"
echo

start_time=$(date +%s)

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

local status
if [[ $exitCode -eq 0 ]]; then
echo -e "\n[${elapsed_time}s] SUCCESS :)"
status=OK
else
echo -e "\n[${elapsed_time}s] FAILED."
status=FAIL
EXIT_CODE=1
fi

SUMMARY="$SUMMARY\n$(printf "%-35s %s" "$title" "$status")"

git reset --hard --quiet
git clean --force

Expand Down Expand Up @@ -87,4 +93,12 @@ try "Verify Go imports" verify_imports
try "Verify license compatibility" ./hack/verify-licenses.sh
try "Verify boilerplate" ./hack/verify-boilerplate.sh

echo
echo "SUMMARY"
echo "======="
echo
echo "Check Result"
echo -n "------------------------------------------"
echo -e "$SUMMARY"

exit $EXIT_CODE
2 changes: 1 addition & 1 deletion hack/download-tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fi
cd tmp

echo "Downloading $BINARY" >&2
curl --fail -LO "$URL"
curl --fail --silent -LO "$URL"
archive="$(ls)"

UNCOMPRESSED=${UNCOMPRESSED:-false}
Expand Down

0 comments on commit fda5871

Please sign in to comment.