@@ -228,10 +228,10 @@ for j in $jsons; do
228
228
# as discussed in RHDH SOS on Jul 14, we are now opening the door for TP plugins to be on by default.
229
229
# PM (Ben) and Support (Tim) are cool with this as long as the docs clearly state
230
230
# 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
232
232
echo " * \` ${Plugin} \` " >> " $ENABLED_PLUGINS "
233
233
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
235
235
fi
236
236
fi
237
237
@@ -295,28 +295,42 @@ for j in $jsons; do
295
295
echo
296
296
done
297
297
298
+ c=0
299
+ if [[ $QUIET -eq 0 ]]; then
300
+ echo " Creating .csv ..."
301
+ fi
302
+
298
303
# create .csv file with header
299
304
echo -e " \" Name\" ,\" Plugin\" ,\" Role\" ,\" Version\" ,\" Support Level\" ,\" Path\" ,\" Required Variables\" ,\" Default\" " > " ${0/ .sh/ .csv} "
300
305
301
306
num_plugins=()
302
307
# append to .csv and .adocN files
303
308
rm -f " ${0/ .sh/ .adoc1} "
304
309
sorted=(); 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
308
317
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
311
323
num_plugins+=(${# adoc1[@]} )
312
324
313
325
rm -f " ${0/ .sh/ .adoc2} "
314
326
sorted=(); while IFS= read -rd ' ' key; do sorted+=( " $key " ); done < <( printf ' %s\0' " ${! adoc2[@]} " | sort -z)
315
327
# shellcheck disable=SC2128
316
328
if [[ $sorted ]] ; then
317
329
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} "
320
334
done
321
335
fi
322
336
num_plugins+=(${# adoc2[@]} )
@@ -326,12 +340,16 @@ sorted=(); while IFS= read -rd '' key; do sorted+=( "$key" ); done < <(printf '%
326
340
# shellcheck disable=SC2128
327
341
if [[ $sorted ]] ; then
328
342
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} "
331
347
done
332
348
fi
333
349
num_plugins+=(${# adoc3[@]} )
334
350
351
+ if [[ $QUIET -eq 0 ]]; then echo ; fi
352
+
335
353
# merge the content from the three .adocX files into the .template.adoc file, replacing the TABLE_CONTENT markers
336
354
count=1
337
355
index=0
0 commit comments