Write a package's first version with wingetsource new-package #23

Closed
opened 2026-10-14 11:41:44 -05:00 by jeff · 0 comments
Owner

A package's first version is written by hand today: new-version refuses a package with no versions, and CONTRIBUTING says the first one is written by hand. Harrier and Zfj were each written that way, and their files differ only in what is particular to the program.

Add wingetsource new-package, which writes a package's first version from flags:

  • --identifier JCOllie.<Program>, --version, --repository jeff/<program>, --type portable|msi, --installer ARCH=URL (repeatable).
  • --name, --short-description, --description or --description-file, --license <SPDX>, --tag (repeatable).
  • --moniker and --command, defaulting to the program's name in lower case; --release-notes-url, --release-date and --json as in new-version.
  • Publisher, PublisherUrl, PackageUrl, LicenseUrl (…/src/branch/main/LICENSES/<SPDX>.txt), the SPDX and schema lines, en-US and ManifestVersion follow from those.
  • For an MSI, ProductCode, UpgradeCode and ALLUSERS are read from the downloaded installer with msiinfo; Scope: machine is written only for ALLUSERS=1.

It refuses when the package already has a version, when the identifier is not JCOllie.<Program>, when an installer is not on git.jcollie.dev, or when what it would write fails check. Only a person runs it, so ADR 0004 does not hold its options fixed.

Done when the devshell has msitools, tests rebuild Zfj 0.4.0 and Harrier 0.1.0 from flags, and CONTRIBUTING and the README describe it.

A package's first version is written by hand today: `new-version` refuses a package with no versions, and CONTRIBUTING says the first one is written by hand. Harrier and Zfj were each written that way, and their files differ only in what is particular to the program. Add `wingetsource new-package`, which writes a package's first version from flags: - `--identifier JCOllie.<Program>`, `--version`, `--repository jeff/<program>`, `--type portable|msi`, `--installer ARCH=URL` (repeatable). - `--name`, `--short-description`, `--description` or `--description-file`, `--license <SPDX>`, `--tag` (repeatable). - `--moniker` and `--command`, defaulting to the program's name in lower case; `--release-notes-url`, `--release-date` and `--json` as in `new-version`. - Publisher, PublisherUrl, PackageUrl, LicenseUrl (`…/src/branch/main/LICENSES/<SPDX>.txt`), the SPDX and schema lines, `en-US` and `ManifestVersion` follow from those. - For an MSI, `ProductCode`, `UpgradeCode` and `ALLUSERS` are read from the downloaded installer with `msiinfo`; `Scope: machine` is written only for `ALLUSERS=1`. It refuses when the package already has a version, when the identifier is not `JCOllie.<Program>`, when an installer is not on git.jcollie.dev, or when what it would write fails `check`. Only a person runs it, so ADR 0004 does not hold its options fixed. Done when the devshell has msitools, tests rebuild Zfj 0.4.0 and Harrier 0.1.0 from flags, and CONTRIBUTING and the README describe it.
jeff closed this issue 2026-10-14 11:56:21 -05:00
Sign in to join this conversation.
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#23
No description provided.