From 20f46c75c438ecb324d16d4403acc26b0707956f Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sat, 16 Sep 2023 12:01:55 +0100 Subject: [PATCH] Tools: Make it easier to update plugin demo types --- .../generator-joplin/updateTypesAndDemos.sh | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/generator-joplin/updateTypesAndDemos.sh b/packages/generator-joplin/updateTypesAndDemos.sh index 35eeadc14..836c5014b 100755 --- a/packages/generator-joplin/updateTypesAndDemos.sh +++ b/packages/generator-joplin/updateTypesAndDemos.sh @@ -12,13 +12,25 @@ set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" CLI_DIR="$SCRIPT_DIR/../app-cli" LIB_DIR="$SCRIPT_DIR/../lib" +TEST_PLUGINS_DIR="$SCRIPT_DIR/../app-cli/tests/support/plugins" ./updateTypes.sh -npm link +API_SOURCE_DIR="$SCRIPT_DIR/generators/app/templates/api" -"$CLI_DIR/tests/support/plugins/updatePlugins.sh" +for DIR in $TEST_PLUGINS_DIR/*/ ; do + if [ -d "$DIR/api" ]; then + echo "Updating $DIR/api/..." + rsync -a "$API_SOURCE_DIR/" "$DIR/api/" + fi + exit +done -git add -A -git c -m "Plugins: Updated types" -git push + +# npm link + +# "$CLI_DIR/tests/support/plugins/updatePlugins.sh" + +# git add -A +# git c -m "Plugins: Updated types" +# git push