@@ -228,10 +228,10 @@ for j in $jsons; do
228228 # as discussed in RHDH SOS on Jul 14, we are now opening the door for TP plugins to be on by default.
229229 # PM (Ben) and Support (Tim) are cool with this as long as the docs clearly state
230230 # what is TP, and how to disable the TP content
231- echo -e " ${blue} [WARNING]: $Plugin is enabled by default but is only $Support_Level ${norm} " | tee -a ${ENABLED_PLUGINS} .errors
231+ echo -e " ${blue} [WARN] $Plugin is enabled by default but is only $Support_Level ${norm} " | tee -a ${ENABLED_PLUGINS} .errors
232232 echo " * \` ${Plugin} \` " >> " $ENABLED_PLUGINS "
233233 else
234- echo -e " ${red} [ERROR]: $Plugin should not be enabled by default as its support level is $Support_Level ${norm} " | tee -a ${ENABLED_PLUGINS} .errors
234+ echo -e " ${red} [ERROR] $Plugin should not be enabled by default as its support level is $Support_Level ${norm} " | tee -a ${ENABLED_PLUGINS} .errors
235235 fi
236236 fi
237237
@@ -295,28 +295,42 @@ for j in $jsons; do
295295 echo
296296done
297297
298+ c=0
299+ if [[ $QUIET -eq 0 ]]; then
300+ echo " Creating .csv ..."
301+ fi
302+
298303# create .csv file with header
299304echo -e " \" Name\" ,\" Plugin\" ,\" Role\" ,\" Version\" ,\" Support Level\" ,\" Path\" ,\" Required Variables\" ,\" Default\" " > " ${0/ .sh/ .csv} "
300305
301306num_plugins=()
302307# append to .csv and .adocN files
303308rm -f " ${0/ .sh/ .adoc1} "
304309sorted=(); while IFS= read -rd ' ' key; do sorted+=( " $key " ); done < <( printf ' %s\0' " ${! adoc1[@]} " | sort -z)
305- for key in " ${sorted[@]} " ; do
306- echo -e " ${adoc1[$key]} " >> " ${0/ .sh/ .ref-rh-supported-plugins} "
307- if [[ $key != * " techdocs" * ]]; then
310+ if [[ $sorted ]] ; then
311+ for key in " ${sorted[@]} " ; do
312+ (( c = c + 1 ))
313+ if [[ $QUIET -eq 0 ]]; then echo " * [$c ] $key [ supported-plugins ] = ${csv[$key]} " ; fi
314+ echo -e " ${adoc1[$key]} " >> " ${0/ .sh/ .ref-rh-supported-plugins} "
315+ # RHIDP-4196 omit techdocs plugins from the .csv
316+ if [[ $key != * " techdocs" * ]]; then
308317 echo -e " ${csv[$key]} " >> " ${0/ .sh/ .csv} "
309- fi
310- done
318+ else
319+ if [[ $QUIET -eq 0 ]]; then echo -e " ${blue} [WARN] Omit plugin $key from .csv file${norm} " ; fi
320+ fi
321+ done
322+ fi
311323num_plugins+=(${# adoc1[@]} )
312324
313325rm -f " ${0/ .sh/ .adoc2} "
314326sorted=(); while IFS= read -rd ' ' key; do sorted+=( " $key " ); done < <( printf ' %s\0' " ${! adoc2[@]} " | sort -z)
315327# shellcheck disable=SC2128
316328if [[ $sorted ]] ; then
317329 for key in " ${sorted[@]} " ; do
318- echo -e " ${adoc2[$key]} " >> " ${0/ .sh/ .ref-rh-tech-preview-plugins} " ;
319- echo -e " ${csv[$key]} " >> " ${0/ .sh/ .csv} "
330+ (( c = c + 1 ))
331+ if [[ $QUIET -eq 0 ]]; then echo " * [$c ] $key [ tech-preview-plugins ] = ${csv[$key]} " ; fi
332+ echo -e " ${adoc2[$key]} " >> " ${0/ .sh/ .ref-rh-tech-preview-plugins} " ;
333+ echo -e " ${csv[$key]} " >> " ${0/ .sh/ .csv} "
320334 done
321335fi
322336num_plugins+=(${# adoc2[@]} )
@@ -326,12 +340,16 @@ sorted=(); while IFS= read -rd '' key; do sorted+=( "$key" ); done < <(printf '%
326340# shellcheck disable=SC2128
327341if [[ $sorted ]] ; then
328342 for key in " ${sorted[@]} " ; do
329- echo -e " ${adoc3[$key]} " >> " ${0/ .sh/ .ref-community-plugins} " ;
330- echo -e " ${csv[$key]} " >> " ${0/ .sh/ .csv} "
343+ (( c = c + 1 ))
344+ if [[ $QUIET -eq 0 ]]; then echo " * [$c ] $key [ community-plugins ] = ${csv[$key]} " ; fi
345+ echo -e " ${adoc3[$key]} " >> " ${0/ .sh/ .ref-community-plugins} " ;
346+ echo -e " ${csv[$key]} " >> " ${0/ .sh/ .csv} "
331347 done
332348fi
333349num_plugins+=(${# adoc3[@]} )
334350
351+ if [[ $QUIET -eq 0 ]]; then echo ; fi
352+
335353# merge the content from the three .adocX files into the .template.adoc file, replacing the TABLE_CONTENT markers
336354count=1
337355index=0
0 commit comments