Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

fix: use FileVersion struct fields instead of array in gen_versioninfo - #23

Merged
lucasmodrich merged 1 commit into
mainfrom
fix-versioninfo-json-format
Feb 21, 2026
Merged

lucasmodrich merged 1 commit into
mainfrom
fix-versioninfo-json-format

Conversation

@lucasmodrich

Copy link
Copy Markdown
Owner

Summary

  • Fix gen_versioninfo.go: goversioninfo expects FileVersion and ProductVersion as {Major, Minor, Patch, Build} objects, not [4]uint16 arrays

Root Cause

The v2.2.0 release workflow failed with:

Could not parse the .json file: json: cannot unmarshal array into Go struct field
FixedFileInfo.FixedFileInfo.FileVersion of type goversioninfo.FileVersion

The goversioninfo tool's FileVersion type is a struct, not an array. The generated JSON was producing [2,2,0,0] where {"Major":2,"Minor":2,"Patch":0,"Build":0} is required.

Test plan

  • go run ./cmd/git-worktree-manager/gen_versioninfo.go 2.2.0 produces FileVersion: {"Major":2,"Minor":2,"Patch":0,"Build":0} (verified locally ✓)
  • goversioninfo compiles the JSON without error (verified locally ✓)
  • Release workflow succeeds and v2.2.x is published with populated Windows Details tab

🤖 Generated with Claude Code

goversioninfo expects FileVersion/ProductVersion as {Major, Minor, Patch, Build}
objects, not [4]uint16 arrays. The release build was failing with:
"cannot unmarshal array into Go struct field FixedFileInfo.FileVersion"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lucasmodrich
lucasmodrich merged commit 530b7fc into main Feb 21, 2026
2 checks passed
@lucasmodrich
lucasmodrich deleted the fix-versioninfo-json-format branch February 21, 2026 03:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant