From 43c013e7dfd6b62d9da1f7ee20a07ef20c0caf3b Mon Sep 17 00:00:00 2001 From: Eugene Kozlov Date: Tue, 6 Oct 2020 20:55:45 +0000 Subject: [PATCH] feat: add ability to use hook function --- integ/scripts/bash/rfdk-integ-e2e.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/integ/scripts/bash/rfdk-integ-e2e.sh b/integ/scripts/bash/rfdk-integ-e2e.sh index 80d904222..53bf2b98f 100755 --- a/integ/scripts/bash/rfdk-integ-e2e.sh +++ b/integ/scripts/bash/rfdk-integ-e2e.sh @@ -71,6 +71,12 @@ export INFRASTRUCTURE_DEPLOY_FINISH_TIME=$SECONDS # Pull the top level directory for each cdk app in the components directory for COMPONENT in **/cdk.json; do + # Invoke hook function if it is exported and name is defined in HOOK_FUNCTION variable + if [ -n "$HOOK_FUNCTION" ] && [ "$(type -t $HOOK_FUNCTION)" == "function" ] + then + $HOOK_FUNCTION + fi + COMPONENT_ROOT="$(dirname "$COMPONENT")" COMPONENT_NAME=$(basename "$COMPONENT_ROOT") # Use a pattern match to exclude the infrastructure app from the results