From 65f05ea80cd13f0f2c64d528d10ec78309c6e984 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Wed, 21 Feb 2024 00:20:50 +0000 Subject: [PATCH] Run a manual build script, if present. (#750) If the tree has a 'build-webapp.sh' script, use that. Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/750 Co-authored-by: Thomas E Lackey Co-committed-by: Thomas E Lackey --- .../container-build/cerc-webapp-base/scripts/build-app.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stack_orchestrator/data/container-build/cerc-webapp-base/scripts/build-app.sh b/stack_orchestrator/data/container-build/cerc-webapp-base/scripts/build-app.sh index f44931f4..b515a142 100755 --- a/stack_orchestrator/data/container-build/cerc-webapp-base/scripts/build-app.sh +++ b/stack_orchestrator/data/container-build/cerc-webapp-base/scripts/build-app.sh @@ -11,7 +11,13 @@ WORK_DIR="${1:-/app}" OUTPUT_DIR="${2:-build}" DEST_DIR="${3:-/data}" -if [ -f "${WORK_DIR}/package.json" ]; then +if [ -f "${WORK_DIR}/build-webapp.sh" ]; then + echo "Building webapp with ${WORK_DIR}/build-webapp.sh ..." + cd "${WORK_DIR}" || exit 1 + + rm -rf "${DEST_DIR}" + ./build-webapp.sh "${DEST_DIR}" || exit 1 +elif [ -f "${WORK_DIR}/package.json" ]; then echo "Building node-based webapp ..." cd "${WORK_DIR}" || exit 1