← back to Dw Yolo Loop
thibaut-mfr-fix/run-push.sh
20 lines
#!/usr/bin/env bash
# Wrapper so the Thibaut live push runs from ONE short command (no line-wrap mangling).
# bash ~/Projects/designerwallcoverings/thibaut-mfr-fix/run-push.sh # dry-run (first 3)
# bash ~/Projects/designerwallcoverings/thibaut-mfr-fix/run-push.sh --apply # push all 1,096
# ...also accepts --only=title|tag --limit=N (e.g. --apply --only=title --limit=3 for a canary)
set -euo pipefail
cd "$(dirname "$0")"
export SHOPIFY_STORE="designer-laboratory-sandbox.myshopify.com" # = the live designerwallcoverings.com store
export DATABASE_URL="postgresql:///dw_unified?host=/tmp"
export NODE_PATH="/Users/macstudio3/Projects/Designer-Wallcoverings/node_modules"
export SHOPIFY_ADMIN_TOKEN="$(grep -hiE '^SHOPIFY_ADMIN_TOKEN=' "$HOME/Projects/secrets-manager/.env" | head -1 | cut -d= -f2- | tr -d '"'"'"' ')"
if [ -z "${SHOPIFY_ADMIN_TOKEN:-}" ]; then
echo "FATAL: SHOPIFY_ADMIN_TOKEN not found in ~/Projects/secrets-manager/.env" >&2
exit 1
fi
echo "store=$SHOPIFY_STORE token=…${SHOPIFY_ADMIN_TOKEN: -4} args=${*:-<dry-run>}"
exec node push-thibaut-live.js "$@"