Files
web/scripts/import-promotion-to-api.sh

13 lines
620 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 将 web/promotion/视频发布 导入到 data/uploads + MongoDB site_assets无需后台手动上传
# 依赖server/.env 中 MONGODB_URI、MONGODB_DB与 API 一致);本机可连 Mongo
#
# 用法:
# ./scripts/import-promotion-to-api.sh -site=你的站点MongoID
# ./scripts/import-promotion-to-api.sh -site=xxx -src=/www/yh_web/web/promotion/视频发布 -upload=/www/yh_web/data/uploads
# ./scripts/import-promotion-to-api.sh -site=xxx -dry-run
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT/server"
exec go run -mod=vendor ./cmd/promotion-import/ "$@"