From e18875e1c35156c8e699deb02c579b45a69afd8b Mon Sep 17 00:00:00 2001 From: Steffen Clemens <67413881+td-sclemens@users.noreply.github.com> Date: Mon, 13 May 2024 13:28:42 +0200 Subject: [PATCH] Ensure app config exists (#24) --- shopify/entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shopify/entrypoint.sh b/shopify/entrypoint.sh index d97ddc0..de0bb63 100755 --- a/shopify/entrypoint.sh +++ b/shopify/entrypoint.sh @@ -20,9 +20,9 @@ if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && set -- node "$@" fi -# Keep Makefile and documentation up to date RIPTIDE_SRC="/src/" if [ -d "$RIPTIDE_SRC" ]; then + # Keep Makefile and documentation up to date cp /assets/base.makefile "$RIPTIDE_SRC" if [ ! -f "$RIPTIDE_SRC""Makefile" ]; then cp /assets/Makefile "$RIPTIDE_SRC" @@ -31,6 +31,11 @@ if [ -d "$RIPTIDE_SRC" ]; then touch "$RIPTIDE_SRC"".env" fi cp /assets/shopify-app.md "$RIPTIDE_SRC" + + # Create app configuration if missing + if [ ! -f "$RIPTIDE_SRC""shopify.app.toml" ] && [ -f "$RIPTIDE_SRC""template.shopify.app.toml" ]; then + cp "$RIPTIDE_SRC""template.shopify.app.toml" "$RIPTIDE_SRC""shopify.app.toml" + fi fi exec "$@"