fix(ci): parse current vllm-metal version pins (#11457)

* fix(ci): parse current vllm-metal version pins

vllm-metal renamed its installer pin from vllm_v to VLLM_VERSION, breaking both the nightly bumper and the Darwin backend installer after a bump. Share a strict parser that accepts both formats and cover the transition with shell regressions.

Assisted-by: Codex:gpt-5 [Codex]

* fix(ci): parse scoped vllm-metal pins

The pinned vllm-metal installer declares its version as a local shell variable. Accept that optional declaration while retaining strict validation of the assignment and semantic version.

Assisted-by: Codex:gpt-5.4

---------

Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
This commit is contained in:
localai-org-maint-botandlocalai-org-maint-bot authored and GitHub committed 2026-08-11 09:53:50 +02:00
1 parent f3ea275c05
commit 16dd81ecd2
4 files changed
+42 -5

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
set -euo pipefail
repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
extractor="$repo_root/scripts/lib/extract-vllm-metal-version.sh"
assert_version() {
local expected=$1
local input=$2
local actual
actual=$(printf '%s\n' "$input" | "$extractor")
if [ "$actual" != "$expected" ]; then
echo "expected version $expected, got $actual" >&2
exit 1
fi
}
assert_version "0.23.0" 'vllm_v="0.23.0"'
assert_version "0.26.0" ' local vllm_v="0.26.0"'
assert_version "0.26.0" 'VLLM_VERSION="0.26.0"'
assert_version "0.26.1" ' VLLM_VERSION = "0.26.1" # comment'
if printf '%s\n' 'VLLM_VERSION="not-a-version"' | "$extractor"; then
echo "malformed versions must be rejected" >&2
exit 1
fi
if printf '%s\n' 'VLLM_VERSION="0.26.0"garbage' | "$extractor"; then
echo "trailing assignment content must be rejected" >&2
exit 1
fi
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
set -euo pipefail
grep -m1 -oE '^[[:space:]]*(local[[:space:]]+)?(vllm_v|VLLM_VERSION)[[:space:]]*=[[:space:]]*"[0-9]+\.[0-9]+\.[0-9]+"[[:space:]]*(#.*)?$' \
| grep -oE '[0-9]+\.[0-9]+\.[0-9]+'