Skip to content

Commit 9ae94ae

Browse files
authored
chore: RHDHBUGS-3120: add alternative text if there are no deprecations (#2185)
Signed-off-by: Kim Tsao <ktsao@redhat.com>
1 parent b9c2f84 commit 9ae94ae

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

modules/extend_dynamic-plugins-reference/ref-deprecated-plugins.adoc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,4 @@
66
= Deprecated plugins
77

88
[role="_abstract"]
9-
{product} ({product-very-short}) includes several deprecated plugins, which are no longer being actively developed. Migrate to an alternative solution as soon as possible, because these plugins will be removed in a future release.
10-
11-
{product-very-short} includes the following 0 deprecated plugins.
12-
9+
There are no deprecated plugins in this release of {product} ({product-very-short})

modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,13 +520,15 @@ generate_dynamic_plugins_table() {
520520
sed -e "/%%TABLE_CONTENT_${count}%%/{r $adocfile" -e 'd;}' \
521521
-e "s/\%\%COUNT_${count}\%\%/$this_num_plugins/" \
522522
"${0/rhdh-supported-plugins.sh/${d}.template.adoc}" > "${0/rhdh-supported-plugins.sh/${d}.adoc}"
523-
else
523+
elif [[ $d == ref-deprecated-plugins ]]; then
524+
524525
echo -e "${blue} no plugins to include: ${d}.adoc table removed.${norm}"
525526
(( empties = empties + 1 ))
526-
# delete from table header line to end of file
527-
sed -r -e '/\[%header,cols=.+\]/,$d' \
528-
-e "s/\%\%COUNT_${count}\%\%/$this_num_plugins/" \
529-
"${0/rhdh-supported-plugins.sh/${d}.template.adoc}" > "${0/rhdh-supported-plugins.sh/${d}.adoc}"
527+
# Only ref-deprecated-plugins can be empty; print through [role="_abstract"], then fixed sentence ({product} etc. resolve at book build).
528+
{
529+
sed -n '1,/^\[role="_abstract"\]$/p' "${0/rhdh-supported-plugins.sh/${d}.template.adoc}"
530+
printf '%s\n' 'There are no deprecated plugins in this release of {product} ({product-very-short})'
531+
} > "${0/rhdh-supported-plugins.sh/${d}.adoc}"
530532
fi
531533
rm -f "$adocfile"
532534
echo ""

0 commit comments

Comments
 (0)