Skip to content

Commit bd0320f

Browse files
committed
chore: dynamic plugins are all now expressed as wrappers so we don't need to parse janus-plugins repo anymore
Signed-off-by: Nick Boldt <[email protected]>
1 parent ff89067 commit bd0320f

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

modules/dynamic-plugins/rhdh-supported-plugins.sh

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
#!/bin/bash
22

33
# script to generate rhdh-supported-plugins.adoc from content in
4-
# https://github.com/janus-idp/backstage-plugins/tree/main/plugins/ */package.json
54
# https://github.com/janus-idp/backstage-showcase/tree/main/dynamic-plugins/wrappers/ */json
65

76
SCRIPT_DIR=$(cd "$(dirname "$0")" || exit; pwd)
87

9-
pluginsRepo="https://github.com/janus-idp/backstage-plugins" # TODO move to BCP and rhdh-plugins
108
showcaseRepo="https://github.com/janus-idp/backstage-showcase" # TODO move to rhd/rhdh
119
usage() {
1210
cat <<EOF
1311
1412
Generate an updated table of dynamic plugins from content in the following two repos, for the specified branch:
15-
* $pluginsRepo
1613
* $showcaseRepo
1714
1815
Requires:
@@ -37,7 +34,7 @@ EOF
3734

3835
while [[ "$#" -gt 0 ]]; do
3936
case $1 in
40-
'--clean') rm -fr /tmp/plugin-versions.txt /tmp/backstage-plugins /tmp/backstage-showcase;;
37+
'--clean') rm -fr /tmp/plugin-versions.txt /tmp/backstage-showcase;;
4138
'-b'|'--ref-branch') BRANCH="$2"; shift 1;; # reference branch, eg., 1.1.x
4239
'-h'|'--help') usage;;
4340
*) echo "Unknown parameter used: $1."; usage; exit 1;;
@@ -48,14 +45,8 @@ done
4845
if [[ ! $BRANCH ]]; then usage; exit 1; fi
4946

5047
# fetch GH repos
51-
# TODO switch this to backstage/community-plugins
52-
if [[ ! -d /tmp/backstage-plugins ]]; then
53-
pushd /tmp >/dev/null || exit
54-
git clone "$pluginsRepo" --depth 1 -b "$BRANCH" backstage-plugins
55-
popd >/dev/null || exit
56-
fi
57-
58-
# TODO switch this to redhat-developer/rhdh
48+
# TODO include backstage/community-plugins and redhat-developer/rhdh-plugins ?
49+
# TODO switch to redhat-developer/red-hat-developer-hub
5950
if [[ ! -d /tmp/backstage-showcase ]]; then
6051
pushd /tmp >/dev/null || exit
6152
git clone "$showcaseRepo" --depth 1 -b "$BRANCH" backstage-showcase
@@ -105,8 +96,8 @@ declare -A adoc2
10596
declare -A adoc3
10697
declare -A csv
10798

108-
# process 2 folders of json files
109-
jsons=$(find /tmp/backstage-showcase/dynamic-plugins/wrappers/ /tmp/backstage-plugins/plugins/ -maxdepth 2 -name package.json | sort -V)
99+
# process 1 folders of json files
100+
jsons=$(find /tmp/backstage-showcase/dynamic-plugins/wrappers/ -maxdepth 2 -name package.json | sort -V)
110101
c=0
111102
tot=0
112103
for j in $jsons; do
@@ -346,7 +337,7 @@ if [[ -f "${ENABLED_PLUGINS}.errors" ]]; then cat "${ENABLED_PLUGINS}.errors"; f
346337

347338
# cleanup
348339
rm -f "$ENABLED_PLUGINS" "${ENABLED_PLUGINS}.errors"
349-
# rm -fr /tmp/backstage-plugins /tmp/backstage-showcase
340+
# rm -fr /tmp/backstage-showcase
350341

351342
warnings=$(grep -c "WARN" "/tmp/warnings.txt")
352343
if [[ $warnings -gt 0 ]]; then

0 commit comments

Comments
 (0)