@@ -58,9 +58,14 @@ Usage: $(basename "$0") [OPTIONS]
5858
5959Options:
6060 -y, --yes Skip confirmation countdown
61+ --only LIST Upgrade only these tools (comma-separated); the rest
62+ stay pinned to versions.env. Tools: claude-code,
63+ cctrace, codex, gemini-cli, grok-cli, ccx,
64+ copilot-api, playwright
6165 -h, --help Show this help
6266
6367Environment:
68+ ONLY Same as --only (e.g. make versions-up ONLY=cctrace)
6469 MAIN_IMAGE Main image name (default: ghcr.io/thevibeworks/deva:latest)
6570 CORE_IMAGE Core image name (default: ghcr.io/thevibeworks/deva:core)
6671 RUST_IMAGE Rust image name (default: ghcr.io/thevibeworks/deva:rust)
@@ -76,16 +81,55 @@ Environment:
7681EOF
7782}
7883
84+ ONLY=" ${ONLY:- } "
85+
7986while [[ $# -gt 0 ]]; do
8087 case $1 in
8188 -y|--yes) AUTO_YES=1; shift ;;
89+ --only) ONLY=" ${2:- } " ; [[ -n $ONLY ]] || { echo " --only requires a tool list" ; exit 1; }; shift 2 ;;
90+ --only=* ) ONLY=" ${1# --only=} " ; shift ;;
8291 -h|--help) usage; exit 0 ;;
8392 * ) echo " Unknown option: $1 " ; usage; exit 1 ;;
8493 esac
8594done
8695
96+ tool_selected () {
97+ [[ -z $ONLY ]] || [[ " ,$ONLY ," == * " ,$1 ," * ]]
98+ }
99+
100+ # --only: fold every non-selected tool into the "pinned" pathway by
101+ # treating its versions.env pin as a CLI override. Downstream resolution,
102+ # manifest display, and build args need no changes.
103+ apply_only_filter () {
104+ [[ -n $ONLY ]] || return 0
105+
106+ local tool
107+ local known=" claude-code cctrace codex gemini-cli grok-cli ccx copilot-api playwright"
108+ for tool in ${ONLY// ,/ } ; do
109+ case " $known " in
110+ * " $tool " * ) ;;
111+ * ) echo " error: unknown tool in --only: $tool " >&2
112+ echo " known: $known " >&2
113+ exit 1 ;;
114+ esac
115+ done
116+
117+ tool_selected claude-code || _CLI_CLAUDE_CODE=" ${_CLI_CLAUDE_CODE:- $CLAUDE_CODE_VERSION } "
118+ tool_selected cctrace || _CLI_CCTRACE=" ${_CLI_CCTRACE:- $CCTRACE_VERSION } "
119+ tool_selected codex || _CLI_CODEX=" ${_CLI_CODEX:- $CODEX_VERSION } "
120+ tool_selected gemini-cli || _CLI_GEMINI=" ${_CLI_GEMINI:- $GEMINI_CLI_VERSION } "
121+ tool_selected grok-cli || _CLI_GROK=" ${_CLI_GROK:- $GROK_CLI_VERSION } "
122+ tool_selected ccx || _CLI_CCX=" ${_CLI_CCX:- $CCX_VERSION } "
123+ tool_selected copilot-api || _CLI_COPILOT=" ${_CLI_COPILOT:- $COPILOT_API_VERSION } "
124+ tool_selected playwright || _CLI_PLAYWRIGHT=" ${_CLI_PLAYWRIGHT:- $PLAYWRIGHT_VERSION } "
125+
126+ echo " Selective upgrade: $ONLY (all other tools pinned to versions.env)"
127+ echo " "
128+ }
129+
87130main () {
88131 load_version_pins
132+ apply_only_filter
89133
90134 echo -e " ${CYAN}${BOLD} ╔════════════════════════════════════════════════════╗${RESET} "
91135 echo -e " ${CYAN}${BOLD} ║ Upgrading to Latest Versions ║${RESET} "
@@ -103,6 +147,23 @@ main() {
103147 exit 0
104148 fi
105149
150+ # --only: gate on the selected tools, not the whole manifest — a lagging
151+ # unselected tool must not trigger a rebuild of nothing but pins.
152+ if [[ -n $ONLY ]]; then
153+ local _t _cur _lat _only_needs_update=0
154+ for _t in ${ONLY// ,/ } ; do
155+ _cur=$( normalize_version " $( get_current " $_t " ) " )
156+ _lat=$( normalize_version " $( get_latest " $_t " ) " )
157+ if [[ -z $_cur || $_cur == " -" || $_cur != " $_lat " ]]; then
158+ _only_needs_update=1
159+ fi
160+ done
161+ if [[ $_only_needs_update -eq 0 ]]; then
162+ echo -e " ${GREEN} Selected tool(s) up-to-date: ${ONLY} . Nothing to upgrade.${RESET} "
163+ exit 0
164+ fi
165+ fi
166+
106167 print_changelogs
107168
108169 # Resolve build versions early so we can show the manifest before countdown.
0 commit comments