From e3b8d74b0d8746efc27b5e97cf7f81b41d62bb01 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 10 Jul 2023 17:58:17 +0200 Subject: [PATCH] MOBILE-4331 native: Build native plugin on hook --- config.xml | 1 + scripts/cordova-hooks/before_plugin_add.sh | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100755 scripts/cordova-hooks/before_plugin_add.sh diff --git a/config.xml b/config.xml index b85d51b42..796a5978a 100644 --- a/config.xml +++ b/config.xml @@ -18,6 +18,7 @@ + diff --git a/scripts/cordova-hooks/before_plugin_add.sh b/scripts/cordova-hooks/before_plugin_add.sh new file mode 100755 index 000000000..3139de83d --- /dev/null +++ b/scripts/cordova-hooks/before_plugin_add.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [[ $CORDOVA_PLUGINS == *cordova-plugin-moodleapp* ]]; then + echo "Building cordova-plugin-moodleapp" + + cd cordova-plugin-moodleapp + npm run prod +fi