Read an MSI's ProductCode in new-version #26

Merged
jeff merged 1 commit from msi-product-code into main 2026-10-14 12:02:28 -05:00
Owner

new-version now reads a new MSI's ProductCode from the MSI itself, with msiinfo, instead of requiring --product-code.

  • --product-code stays as an override; when it is given the MSI is not read. Making it optional is an addition, which ADR 0004 allows, so programs that pass product-codes keep working.
  • The MSI's UpgradeCode must be one the manifest already gives, so a wrong program's MSI is refused rather than published with its ProductCode.
  • Refuses, writing nothing, when the MSI cannot be read or has no ProductCode.
  • The download-to-file moves to check.py and the msiinfo reading to msi.py, shared with new-package.
  • Tried for real: new-version for a pretend Zfj 0.4.1 from 0.4.0's MSI wrote the committed ProductCode unchanged; pointing Harrier at Zfj's MSI was refused on the UpgradeCode.

Closes #24. Unblocks jeff/winget-submit#8.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D31MsLkM9DkCauP1EB2zgw

`new-version` now reads a new MSI's `ProductCode` from the MSI itself, with `msiinfo`, instead of requiring `--product-code`. - `--product-code` stays as an override; when it is given the MSI is not read. Making it optional is an addition, which ADR 0004 allows, so programs that pass `product-codes` keep working. - The MSI's `UpgradeCode` must be one the manifest already gives, so a wrong program's MSI is refused rather than published with its `ProductCode`. - Refuses, writing nothing, when the MSI cannot be read or has no `ProductCode`. - The download-to-file moves to `check.py` and the `msiinfo` reading to `msi.py`, shared with `new-package`. - Tried for real: `new-version` for a pretend Zfj 0.4.1 from 0.4.0's MSI wrote the committed `ProductCode` unchanged; pointing Harrier at Zfj's MSI was refused on the `UpgradeCode`. Closes #24. Unblocks jeff/winget-submit#8. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01D31MsLkM9DkCauP1EB2zgw
read an MSI's ProductCode in new-version
All checks were successful
test / test (pull_request) Successful in 1m54s
test / publish (pull_request) Has been skipped
f8c4932f52
new-version refused an installer with a ProductCode unless its new one
was given with --product-code, so every program's release workflow had
to read the code out of its own MSI and pass it through winget-submit.
It downloads the installer anyway, so it now reads the code from it
with msiinfo, as new-package does; --product-code stays as an override,
and the MSI is then not read. Making the flag optional is an addition,
as ADR 0004 allows.

The new MSI's UpgradeCode has to be one the manifest already gives, so
that the wrong program's MSI is refused rather than published with its
ProductCode.

The download to a file moves to check.py and the msiinfo reading to
msi.py, shared by new-package and new-version.

Closes #24

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01D31MsLkM9DkCauP1EB2zgw
jeff merged commit 29e2939e1a into main 2026-10-14 12:02:28 -05:00
jeff deleted branch msi-product-code 2026-10-14 12:02:28 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jeff/winget-pkgs!26
No description provided.