From 30b55bba4c0daff82973a3c431e6b803287f0282 Mon Sep 17 00:00:00 2001 From: Ronen Mars Date: Sat, 12 Sep 2026 04:10:35 +0300 Subject: [PATCH] feat(deploy): add deploy:skip-tests to skip lint+tests only --- package.json | 1 + scripts/deploy.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 397e0618..d96ac47e 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "update-schema:shared": "tsx scripts/update-schema.ts --shared", "deploy": "scripts/deploy.sh deploy", "deploy:force": "scripts/deploy.sh deploy --force", + "deploy:skip-tests": "scripts/deploy.sh deploy --skip-tests", "deploy:rollback": "scripts/deploy.sh rollback", "deploy:status": "scripts/deploy.sh status", "deploy:healthcheck": "scripts/deploy.sh healthcheck", diff --git a/scripts/deploy.sh b/scripts/deploy.sh index e1e45b5d..03e59495 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -4,6 +4,7 @@ # Usage: # scripts/deploy.sh # build + deploy current HEAD # scripts/deploy.sh --force # deploy even if working tree is dirty / not on main +# scripts/deploy.sh --skip-tests # skip lint + tests only (still enforces branch/dirty checks) # scripts/deploy.sh --clear-logs # clear stdout/stderr logs after deploy (default: preserve) # scripts/deploy.sh --install-shim= # m = standard|user-local|custom|skip; non-interactive choice # # for the global `threadbase-streamer` shim. Default: prompt. @@ -825,10 +826,11 @@ activate_release() { } cmd_deploy() { - local force="" clear_logs_flag=0 + local force="" clear_logs_flag=0 skip_tests=0 for arg in "$@"; do case "$arg" in --force) force="--force" ;; + --skip-tests) skip_tests=1 ;; --clear-logs) clear_logs_flag=1 ;; --install-shim=*) export TB_INSTALL_SHIM="${arg#--install-shim=}" ;; --path-update=*) export TB_PATH_UPDATE="${arg#--path-update=}" ;; @@ -851,8 +853,8 @@ cmd_deploy() { cd "$REPO_ROOT" ensure_native_modules_match_node - if [[ "$force" == "--force" ]]; then - warn "skipping lint + tests (--force)" + if [[ "$force" == "--force" || "$skip_tests" == 1 ]]; then + warn "skipping lint + tests" else log "running lint + tests" npm run lint @@ -965,7 +967,7 @@ case "${1:-deploy}" in shift cmd_deploy "$@" ;; - --force|--install-shim=*|--path-update=*) + --force|--skip-tests|--install-shim=*|--path-update=*) cmd_deploy "$@" ;; "") @@ -980,7 +982,7 @@ case "${1:-deploy}" in nightly-uninstall) uninstall_nightly_restart_job ;; *) err "unknown command: $1" - echo "usage: $0 [deploy [--force] | rollback | status | healthcheck | restart | free-port | nightly-install | nightly-uninstall]" >&2 + echo "usage: $0 [deploy [--force|--skip-tests] | rollback | status | healthcheck | restart | free-port | nightly-install | nightly-uninstall]" >&2 exit 2 ;; esac