Fix malformed box.json and guard release version extraction - #59
Conversation
…action box.json's scripts object had a trailing comma after its last entry, which is invalid strict JSON (CommandBox's own lenient parser tolerated it, but jq did not). The release workflow reads the version via `jq '.version' -r`, so on main this silently produced an empty VERSION, which then tagged the repo as "v", published cbfs+9 to ForgeBox, and hard-failed the GitHub Release step. - Remove the trailing comma so box.json is valid JSON. - Use jq -e and explicitly fail the step if VERSION is empty, so a malformed box.json can't silently produce a broken release again.
boxlang-cfml@1 ColdBox ^8 Test Results 1 files 5 suites 14s ⏱️ Results for commit 4c4b0e1. |
lucee@6 ColdBox ^8 Test Results 1 files 5 suites 10s ⏱️ Results for commit 4c4b0e1. |
boxlang@1 ColdBox ^8 Test Results 1 files 5 suites 13s ⏱️ Results for commit 4c4b0e1. |
boxlang@1 ColdBox be Test Results 1 files 5 suites 12s ⏱️ Results for commit 4c4b0e1. |
adobe@2023 ColdBox ^8 Test Results 1 files 5 suites 11s ⏱️ Results for commit 4c4b0e1. |
boxlang-cfml@1 ColdBox be Test Results 1 files 5 suites 12s ⏱️ Results for commit 4c4b0e1. |
adobe@2025 ColdBox ^8 Test Results 1 files 5 suites 11s ⏱️ Results for commit 4c4b0e1. |
adobe@2023 ColdBox be Test Results 1 files 5 suites 13s ⏱️ For more details on these failures, see this check. Results for commit 4c4b0e1. |
adobe@2025 ColdBox be Test Results 1 files 5 suites 11s ⏱️ Results for commit 4c4b0e1. |
Summary
The last release run on
maintagged the repo asv(empty version), publishedcbfs+9to ForgeBox instead of a proper semver, and then hard-failed in the GitHub Release step (INPUT_TITLE: parameter null or not set).Root cause
box.json'sscriptsobject had a trailing comma after its last entry — invalid strict JSON, though CommandBox's own parser tolerates it. The release workflow's version-extraction step:used backtick command substitution around
jq. Whenjqfailed to parse the malformed JSON, the substitution silently produced an empty string and the step still exited 0, soVERSIONwas empty for the rest of the job.(
development'sbox.jsonis already clean — the automatedbox bump --minorstep there rewrites it with CommandBox's own serializer, which doesn't emit trailing commas. Samerelease.ymlhardening is proposed separately fordevelopmentin #58.)Fix
box.jsonso it's valid JSON.jq -e(non-zero exit on anull/parse-failure result) and explicitly fail the step ifVERSIONends up empty, so a brokenbox.jsoncan't silently produce a broken release again.Test plan
jq -e '.version' -r box.jsonsucceedsmainproduces a real version tag/publish🤖 Generated with Claude Code
https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk
Generated by Claude Code