Skip to content

Commit

Permalink
Ensure app config exists (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
td-sclemens authored May 13, 2024
1 parent 57fa8e5 commit e18875e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shopify/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 "$@"

0 comments on commit e18875e

Please sign in to comment.