Skip to content

Commit 87ec1f1

Browse files
committed
refactor: inline common.sh into check-build-and-verify.sh script.
common.sh was used by more than one script until 471a871 commit when we removed another script. Now there is no value to have more files than needed.
1 parent 26e8d18 commit 87ec1f1

File tree

2 files changed

+29
-32
lines changed

2 files changed

+29
-32
lines changed

src/main/scripts/ci/check-build-and-verify.sh

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,41 @@ set -o errexit
99
# Return value of a pipeline is the value of the last command to exit with a non-zero status
1010
set -o pipefail
1111

12+
print_status() {
13+
# $1 is empty if check has succeeded
14+
# $1 equals to 'fail' if check has failed
15+
# $1 equals to 'skip' if check has skipped
16+
local result="$1"
17+
local msg="$2"
18+
19+
local status='SUCCESS'
20+
local color=32
21+
22+
if [ "$result" = 'fail' ]; then
23+
status='FAIL'
24+
color=31
25+
elif [ "$result" = 'skip' ]; then
26+
status='SKIP'
27+
color=33
28+
fi
29+
printf "* %s... \033[1;%dm%s\033[0m\n" "$msg" "$color" "$status"
30+
}
31+
32+
print_log() {
33+
local log_file="$1"
34+
local msg="$2"
35+
36+
echo
37+
printf "=====> \033[1;33m%s\033[0m\n" "$msg"
38+
echo
39+
grep -Ev '^\[INFO\] Download(ing|ed)' "$log_file" || :
40+
}
1241

1342
RUN_ONLY_INTEGRATION_TESTS=no
1443
if [ "${1:-}" = '--only-integration-tests' ]; then
1544
RUN_ONLY_INTEGRATION_TESTS=yes
1645
fi
1746

18-
# shellcheck source=src/main/scripts/ci/common.sh
19-
. "$(dirname "$0")/common.sh"
20-
2147
CS_STATUS=
2248
PMD_STATUS=
2349
LICENSE_STATUS=

src/main/scripts/ci/common.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)