File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -33,33 +33,33 @@ check_updated_assemblies () {
33
33
# concatenate both lists and remove dupe entries
34
34
ALL_ASSEMBLIES=$( echo " $UPDATED_ASSEMBLIES $ASSEMBLIES " | tr ' ' ' \n' | sort -u)
35
35
# check that assemblies are in a topic_map
36
- for ASSEMBLY in $ALL_ASSEMBLIES ; do
36
+ for ASSEMBLY in ${ ALL_ASSEMBLIES} ; do
37
37
# get the page name to search the topic_map
38
38
# search for files only, not folders
39
39
PAGE=" File: $( basename " $ASSEMBLY " .adoc) "
40
40
# don't validate the assembly if it is not in a topic map
41
41
if grep -rq " $PAGE " --include " *.yml" _topic_maps ; then
42
42
# validate the assembly
43
- echo " Validating $ASSEMBLY ... 🚨 "
43
+ echo " Validating $ASSEMBLY ..."
44
44
RED=' \033[0;31m'
45
45
NC=' \033[0m'
46
46
OUTPUT=$( asciidoctor " $ASSEMBLY " -a source-highlighter=rouge -a icons! -o /tmp/out.html -v --failure-level WARN --trace 2>&1 )
47
-
48
47
# check assemblies and fail if errors are reported
49
48
if [[ $? != 0 ]];
50
49
then
51
50
echo -e " ${RED} $OUTPUT ${NC} "
52
- echo " Validation errors found! ❌"
53
- exit 1
51
+ ERRORS=true
54
52
else
55
- echo " No errors found! ✅"
56
- exit 0
53
+ echo " No errors found for $ASSEMBLY ! ✅"
57
54
fi
58
55
else
59
56
echo " $ASSEMBLY is not in a topic_map, skipping validation... 😙"
60
- exit 0
61
57
fi
62
58
done
59
+ if [ " $ERRORS " = true ]; then
60
+ echo " Validation errors found! ❌"
61
+ exit 1
62
+ fi
63
63
}
64
64
65
65
update_log () {
You can’t perform that action at this time.
0 commit comments