Skip to content

fix: support multiple version files in one Record version commit#32

Merged
github-actions[bot] merged 1 commit into
mainfrom
fixes/multi-file-version-commit
Jul 13, 2026
Merged

fix: support multiple version files in one Record version commit#32
github-actions[bot] merged 1 commit into
mainfrom
fixes/multi-file-version-commit

Conversation

@vinitu

@vinitu vinitu commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • workflow-update-version-file.yml: version-file now accepts newline-separated paths, written and committed as a single Record version commit.
  • Backward compatible: single-path callers behave exactly as before (same commit message, same output).
  • Motivation: enclave calls this workflow twice (installed version.txt + root VERSION), producing two identical "Record version vX.Y.Z" commits per release.

Checks

  • actionlint 1.7.12: clean
  • Simulated write/commit steps in a scratch git repo: multi-file (one commit, both files), single-file (backward compat), idempotent re-run (no empty commit)

🤖 Generated with Claude Code

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>
@github-actions
github-actions Bot merged commit 3ee973b into main Jul 13, 2026
3 checks passed
@github-actions
github-actions Bot deleted the fixes/multi-file-version-commit branch July 13, 2026 17:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant