Expand description
Extract the embedded ProductVersion / FileVersion string from
a Windows PE binary’s VERSIONINFO resource — the same data
File Explorer’s Details tab shows.
Used by:
kanade-backend’sPOST /api/agents/publish— auto-derives the Object-Store key from the uploaded bytes, so the operator can’t typo a label that disagrees with the binary (the failure mode that caused the “rollout to 1.0.0 → endless self-update” incident on v0.13.0).kanade agent publishon the CLI — replaces the spawn-based--versionprobe (which only worked on hosts that could execute the binary).
Pure-pelite, no spawn / no OS-specific deps — works from any
host (Linux operator uploading a Windows .exe is fine).
Functions§
- extract_
pe_ version - Read the
ProductVersion(falling back toFileVersion) from the VS_VERSIONINFO resource of a Windows PE. ReturnsNonewhen: