Skip to content

Commit 3d44866

Browse files
lroolleclaude
andcommitted
fix: --only gates the up-to-date exit on selected tools only
A lagging unselected tool no longer triggers a pins-only rebuild when the selected tool is already current. Per review on #423. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent d157b83 commit 3d44866

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

scripts/version-upgrade.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,23 @@ main() {
147147
exit 0
148148
fi
149149

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+
150167
print_changelogs
151168

152169
# Resolve build versions early so we can show the manifest before countdown.

0 commit comments

Comments
 (0)