fix(ci): fix circular reference in version bump scripts

The version:bump:* scripts were using 'cat VERSION > VERSION' which
causes a circular reference error. Changed to read version directly
from package.json using node instead.
This commit is contained in:
darrenhinde 2025-11-26 22:31:54 +00:00
parent e5d640bae6
commit 4e6ee29ddd

View file

@ -35,14 +35,14 @@
"results:openagent": "echo 'OpenAgent results:' && ls -lh evals/results/history/*openagent*.json 2>/dev/null | tail -5 || echo 'No results yet'",
"results:opencoder": "echo 'OpenCoder results:' && ls -lh evals/results/history/*opencoder*.json 2>/dev/null | tail -5 || echo 'No results yet'",
"results:latest": "cat evals/results/latest.json 2>/dev/null | jq '.agent, .passed, .failed' || echo 'No results yet'",
"version": "cat VERSION",
"version": "node -p \"require('./package.json').version\"",
"version:bump": "./scripts/bump-version.sh",
"version:bump:patch": "npm version patch --no-git-tag-version && npm run version > VERSION",
"version:bump:minor": "npm version minor --no-git-tag-version && npm run version > VERSION",
"version:bump:major": "npm version major --no-git-tag-version && npm run version > VERSION",
"version:bump:alpha": "npm version prerelease --preid=alpha --no-git-tag-version && npm run version > VERSION",
"version:bump:beta": "npm version prerelease --preid=beta --no-git-tag-version && npm run version > VERSION",
"version:bump:rc": "npm version prerelease --preid=rc --no-git-tag-version && npm run version > VERSION",
"version:bump:patch": "npm version patch --no-git-tag-version && node -p \"require('./package.json').version\" > VERSION",
"version:bump:minor": "npm version minor --no-git-tag-version && node -p \"require('./package.json').version\" > VERSION",
"version:bump:major": "npm version major --no-git-tag-version && node -p \"require('./package.json').version\" > VERSION",
"version:bump:alpha": "npm version prerelease --preid=alpha --no-git-tag-version && node -p \"require('./package.json').version\" > VERSION",
"version:bump:beta": "npm version prerelease --preid=beta --no-git-tag-version && node -p \"require('./package.json').version\" > VERSION",
"version:bump:rc": "npm version prerelease --preid=rc --no-git-tag-version && node -p \"require('./package.json').version\" > VERSION",
"dev:setup": "cd evals/framework && npm install",
"dev:build": "cd evals/framework && npm run build",
"dev:test": "cd evals/framework && npm test",