Files
chrnx-dev-wp/scripts/seed-the-no-names-local.sh
chrnx 76917decd0 feat(editorial): widen sections and add local track pages
Unify the editorial canvas across section pages, keep release tracks out of Journal, and give each song a listening surface with audio, metadata, platform links, sharing, and optional featured art. Document and seed the local The No Names fixture without changing production data.
2026-08-27 20:24:39 -05:00

21 lines
785 B
Bash
Executable File

#!/bin/sh
set -eu
chrnx_script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
chrnx_project_dir=$(dirname -- "$chrnx_script_dir")
chrnx_docker_cli_dir=${CHRNX_DOCKER_CLI_DIR:-/opt/homebrew/opt/docker/bin}
cd -- "$chrnx_project_dir"
if [ ! -x "$chrnx_docker_cli_dir/docker" ]; then
echo "Docker CLI not found at the approved Colima path: $chrnx_docker_cli_dir/docker" >&2
exit 1
fi
chrnx_host=$(PATH="$chrnx_docker_cli_dir:$PATH" npm exec -- wp-env run cli wp eval 'echo wp_parse_url( home_url( "/" ), PHP_URL_HOST );')
case "$chrnx_host" in
localhost|127.0.0.1) ;;
*) echo "Refusing to seed a non-local WordPress site." >&2; exit 1 ;;
esac
PATH="$chrnx_docker_cli_dir:$PATH" npm exec -- wp-env run cli wp eval-file wp-content/themes/chrnx/scripts/seed-the-no-names-local.php