24 lines
486 B
Bash
Executable File
24 lines
486 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [[ $# -ne 2 ]]; then
|
|
echo "Usage: deploy/sync_to_server.sh user@host /remote/path" >&2
|
|
exit 1
|
|
fi
|
|
|
|
TARGET="$1"
|
|
REMOTE_PATH="$2"
|
|
|
|
rsync -az --delete \
|
|
--exclude ".git" \
|
|
--exclude ".venv" \
|
|
--exclude ".pytest_cache" \
|
|
--exclude "__pycache__" \
|
|
--exclude "data/*.jsonl" \
|
|
--exclude "data/*.duckdb" \
|
|
--exclude "data/*.lock" \
|
|
--exclude "data/*.log" \
|
|
./ "${TARGET}:${REMOTE_PATH}/"
|
|
|
|
echo "Synced to ${TARGET}:${REMOTE_PATH}"
|