new-version: update an MSI installer's ProductCode, and refuse to copy a stale one #18
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#5 Submit new versions from harrier's release workflow
jeff/winget-pkgs
#6 Pass product codes through to new-version
jeff/winget-submit
Reference
jeff/winget-pkgs#18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #5
Blocks: #5 (harrier's half)
wingetsource new-versioncopies an installer'sProductCodeunchanged from theversion it copies. An MSI built with
Product Id="*"has a newProductCodeevery release, so a copied one is wrong, and
checkdoes not notice.This is live: harrier's
release.yamlalready has awingetjob (jeff/harrier9728f73), and now that
JCOllie.Harrier0.1.0 exists (#16), harrier's nextrelease would open a submission carrying 0.1.0's
ProductCode{3BC82F39-D1BE-45F4-8BA4-9CFBCF01F211}— one that passes its check.What harrier's manifest changes per release
From
manifests/j/JCOllie/Harrier/0.1.0/JCOllie.Harrier.installer.yaml:ProductCodesits under thex64installer; the top-levelAppsAndFeaturesEntriesholds only the stableUpgradeCodeand noDisplayVersion. SoInstallers[x64].ProductCodeis the only per-releasefield
new-versiondoes not already rewrite.The change
ProductCodeand no new one is given for its architecture,new-versionfails, writing nothing, with a message saying
--product-codeis needed.Same for a
DisplayVersionanywhere in the installer file, since there isno option to supply one (no package has one today). This is the urgent part:
it turns harrier's next release from a wrong submission into a failed job.
--product-code ARCHITECTURE=CODE, repeatable like--installer,replacing that installer's
ProductCode. Fails if given for an architecturewhose installer has none, or for one with no
--installer. The code iswritten quoted, as in the existing manifest (
'{...}'), and checked to be abraced GUID.
--jsonoutput unchanged.Both are additions to
new-version's behaviour and options, so the commandline stays compatible (ADR 0004). Item 1 does change what an existing
invocation does, but only for a package whose installers carry a
ProductCode— today only harrier, for which the current behaviour is wrong.Also
ProductCode; replacement perarchitecture; the option given for an architecture without one; a bad GUID;
copying
JCOllie.Harrier0.1.0 with and without the option.new-versionparagraph lists the option and the refusal.Then
jeff/winget-submit gains a
product-codesinput passed through as--product-code(filed there), and harrier'swingetjob reads the code fromthe built MSI with
msiinfoand passes it.