fix: support multiple version files in one Record version commit#32
Conversation
version-file now accepts newline-separated paths; all files are written and committed together, so callers updating several markers (e.g. VERSION plus an installed version.txt) no longer produce duplicate 'Record version' commits. Single-path callers are unaffected. Verified: actionlint 1.7.12 clean; write/commit logic simulated in a temp repo for multi-file, single-file, and idempotent-rerun cases. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba1bd9f3d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mkdir -p "$(dirname "$VERSION_FILE")" | ||
| printf '%s\n' "$NEXT_TAG" > "$VERSION_FILE" | ||
| while IFS= read -r version_file; do | ||
| [ -z "$version_file" ] && continue |
There was a problem hiding this comment.
Reject empty version-file lists
When version-file is explicitly set to an empty string or to only blank lines, this continue skips every entry, so no file is written; the commit step then finds no staged diff and exits successfully while the workflow still reports new-tag as written. Previously an empty path failed during the write, so callers with a miswired optional input can now get a false-success release/update; track whether at least one non-empty path was processed and fail otherwise.
Useful? React with 👍 / 👎.
Summary
workflow-update-version-file.yml:version-filenow accepts newline-separated paths, written and committed as a singleRecord versioncommit.version.txt+ rootVERSION), producing two identical "Record version vX.Y.Z" commits per release.Checks
🤖 Generated with Claude Code