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

Merged
jeff merged 1 commit from new-package into main 2026-10-14 11:56:21 -05:00
Owner

Adds wingetsource new-package, which writes a package's first version from flags rather than by hand.

  • Per-program values are flags: --name, --short-description, --description / --description-file, --license, --tag, --moniker, --command, plus --identifier, --version, --repository, --type portable|msi, --installer ARCH=URL, --release-notes-url, --release-date, --json.
  • Everything else is derived: publisher, PublisherUrl, PackageUrl, LicenseUrl (LICENSES/<SPDX>.txt on main), SPDX and schema lines, en-US, ManifestVersion 1.12.0.
  • For an MSI, ProductCode, UpgradeCode and ALLUSERS (→ Scope: machine) are read from the downloaded MSI with msiinfo; msitools joins the devshell.
  • Refuses an existing package, an identifier other than JCOllie.<Program>, an installer off git.jcollie.dev, an MSI without its codes, and anything failing check's rules; nothing is written then.
  • Tests rebuild Zfj 0.4.0, Harrier 0.1.0 and Clipwatch 0.2.1 from their committed values and compare. A real run against Zfj's MSI reproduced the committed files except for the two build comments, which are added by hand.
  • new-version's first-version refusal now points at new-package; README and CONTRIBUTING describe it, and note that ADR 0004 does not fix its options.

Closes #23. The follow-up for new-version reading the MSI is #24.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D31MsLkM9DkCauP1EB2zgw

Adds `wingetsource new-package`, which writes a package's first version from flags rather than by hand. - Per-program values are flags: `--name`, `--short-description`, `--description` / `--description-file`, `--license`, `--tag`, `--moniker`, `--command`, plus `--identifier`, `--version`, `--repository`, `--type portable|msi`, `--installer ARCH=URL`, `--release-notes-url`, `--release-date`, `--json`. - Everything else is derived: publisher, PublisherUrl, PackageUrl, LicenseUrl (`LICENSES/<SPDX>.txt` on main), SPDX and schema lines, `en-US`, `ManifestVersion 1.12.0`. - For an MSI, `ProductCode`, `UpgradeCode` and `ALLUSERS` (→ `Scope: machine`) are read from the downloaded MSI with `msiinfo`; msitools joins the devshell. - Refuses an existing package, an identifier other than `JCOllie.<Program>`, an installer off git.jcollie.dev, an MSI without its codes, and anything failing `check`'s rules; nothing is written then. - Tests rebuild Zfj 0.4.0, Harrier 0.1.0 and Clipwatch 0.2.1 from their committed values and compare. A real run against Zfj's MSI reproduced the committed files except for the two build comments, which are added by hand. - `new-version`'s first-version refusal now points at `new-package`; README and CONTRIBUTING describe it, and note that ADR 0004 does not fix its options. Closes #23. The follow-up for `new-version` reading the MSI is #24. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01D31MsLkM9DkCauP1EB2zgw
write a package's first version with wingetsource new-package
All checks were successful
test / test (pull_request) Successful in 2m9s
test / publish (pull_request) Has been skipped
ffe18770cb
A package's first version was written by hand, and Harrier's and Zfj's
differ from each other only in what is particular to the program.
new-package takes that from flags and derives the rest: the publisher,
the URLs into the program's repository, the SPDX and schema lines, the
default locale and the manifest version. An MSI's ProductCode,
UpgradeCode and ALLUSERS are read from the downloaded MSI with msitools'
msiinfo, so a code is never copied by hand.

It refuses a package that already has a version, an identifier outside
JCOllie, an installer off git.jcollie.dev, an MSI without its codes,
and anything that fails check's rules, and writes nothing then. The
tests rebuild Zfj 0.4.0, Harrier 0.1.0 and Clipwatch 0.2.1 from their
committed manifests' values.

Closes #23

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01D31MsLkM9DkCauP1EB2zgw
jeff merged commit c8a0d4c2e8 into main 2026-10-14 11:56:21 -05:00
jeff deleted branch new-package 2026-10-14 11:56:21 -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!25
No description provided.