mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
refactor(scripts): extract shared utilities into common module
- Move load_env_file, parse_timeout_seconds, build_remote_script, and build_ssh_command to scripts/common.py - Update remote_docker_run.py to import from common module - Improves code organization and reusability
This commit is contained in:
18
.justfile
18
.justfile
@@ -10,18 +10,10 @@ rsync_flags := "-avLh --progress --stats --itemize-changes"
|
||||
upload_excludes := "--exclude-from=.rsyncignore"
|
||||
|
||||
upload:
|
||||
if command -v cygpath >/dev/null 2>&1 || test -n "${MSYSTEM:-}" || test -n "${CYGWIN:-}"; then \
|
||||
env MSYS2_ARG_CONV_EXCL='*' rsync {{ rsync_flags }} {{ upload_excludes }} . {{ remote_root }}/; \
|
||||
else \
|
||||
rsync {{ rsync_flags }} {{ upload_excludes }} . {{ remote_root }}/; \
|
||||
fi
|
||||
rsync {{ rsync_flags }} {{ upload_excludes }} . {{ remote_root }}/; \
|
||||
|
||||
download:
|
||||
if command -v cygpath >/dev/null 2>&1 || test -n "${MSYSTEM:-}" || test -n "${CYGWIN:-}"; then \
|
||||
env MSYS2_ARG_CONV_EXCL='*' rsync {{ rsync_flags }} {{ remote_root }}/outputs .; \
|
||||
else \
|
||||
rsync {{ rsync_flags }} {{ remote_root }}/outputs .; \
|
||||
fi
|
||||
rsync {{ rsync_flags }} {{ remote_root }}/outputs .; \
|
||||
|
||||
sync-pkgs:
|
||||
uv sync --inexact
|
||||
@@ -61,9 +53,3 @@ remote-check:
|
||||
|
||||
remote-dry cmd:
|
||||
uv run python scripts/remote_docker_run.py run --dry-run -- {{ quote(cmd) }}
|
||||
|
||||
remote-test:
|
||||
uv run python scripts/remote_docker_run.py run -- "uv run pytest -q"
|
||||
|
||||
remote-test-one path:
|
||||
uv run python scripts/remote_docker_run.py run -- "uv run pytest -q {{ path }}"
|
||||
|
||||
Reference in New Issue
Block a user