logo3
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
# shellcheck disable=SC1091
|
||||
source "$SCRIPT_DIR/deploy.env"
|
||||
SSH_OPTS=(-o "StrictHostKeyChecking=accept-new" -p "${DEPLOY_PORT:-22}")
|
||||
if [[ -n "${DEPLOY_SSH_KEY:-}" ]]; then
|
||||
SSH_OPTS+=(-i "$DEPLOY_SSH_KEY")
|
||||
fi
|
||||
ssh "${SSH_OPTS[@]}" "${DEPLOY_USER}@${DEPLOY_HOST}" bash -s <<'REMOTE'
|
||||
set -euo pipefail
|
||||
cd /opt/dukang/server/dukang-api
|
||||
echo "==> backfill default SKUs"
|
||||
node scripts/with-api-env.cjs npx ts-node --transpile-only prisma/backfill-product-skus.ts
|
||||
echo "==> rewrite SKU codes to DK"
|
||||
node scripts/with-api-env.cjs npx ts-node --transpile-only prisma/rewrite-sku-codes-dk.ts
|
||||
REMOTE
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 921 KiB |
Reference in New Issue
Block a user