From 6ea107602257d5ed6e9526e8ad4cc481ec141009 Mon Sep 17 00:00:00 2001 From: Muhammad Danish <88161975+mdanish-kh@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:20:58 +0500 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20a=20typo=20I=20made=20=F0=9F=A4=A6?= =?UTF-8?q?=E2=80=8D=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WingetCreateCLI/Properties/Resources.Designer.cs | 2 +- src/WingetCreateCLI/Properties/Resources.resx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WingetCreateCLI/Properties/Resources.Designer.cs b/src/WingetCreateCLI/Properties/Resources.Designer.cs index 05763bf8..c97d7cf7 100644 --- a/src/WingetCreateCLI/Properties/Resources.Designer.cs +++ b/src/WingetCreateCLI/Properties/Resources.Designer.cs @@ -601,7 +601,7 @@ public static string DisplayPreviewOfSelectedInstaller_Message { } /// - /// Looks up a localized string similar to Version to be used when updating the display version field. Version provided in the installer URL arguments will take precendence over this value.. + /// Looks up a localized string similar to Version to be used when updating the display version field. Version provided in the installer URL arguments will take precedence over this value.. /// public static string DisplayVersion_HelpText { get { diff --git a/src/WingetCreateCLI/Properties/Resources.resx b/src/WingetCreateCLI/Properties/Resources.resx index c5ce75c1..880c8a72 100644 --- a/src/WingetCreateCLI/Properties/Resources.resx +++ b/src/WingetCreateCLI/Properties/Resources.resx @@ -1361,7 +1361,7 @@ Base manifest contains DisplayVersion that has not been updated. Use --display-version CLI arg or provide the version in the installer URL. - Version to be used when updating the display version field. Version provided in the installer URL arguments will take precendence over this value. + Version to be used when updating the display version field. Version provided in the installer URL arguments will take precedence over this value. Using display version '{0}' for {1} From 269ca100d073e756dc867bd49a84a5b30f1ad300 Mon Sep 17 00:00:00 2001 From: Muhammad Danish <88161975+mdanish-kh@users.noreply.github.com> Date: Wed, 7 Aug 2024 20:51:16 +0500 Subject: [PATCH 2/2] Update command docs --- doc/new.md | 16 ++++++++++++++++ doc/update.md | 36 ++++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/doc/new.md b/doc/new.md index 56993b21..b3687803 100644 --- a/doc/new.md +++ b/doc/new.md @@ -46,6 +46,21 @@ By typing **ENTER** you will accept the string, and the wizard will move on. ![new command PackageIdentifier](./images/create-packageidentifier.png) +### Auto-filling manifest fields + +If the installer URLs come from a GitHub release, the CLI can automatically fill in missing manifest metadata. A valid GitHub token must be provided using the `--token` argument to use this feature. +The new command flow may automatically fill in the following fields: + +- `License` - The license from the GitHub repository. +- `ShortDescription` - The description from the GitHub repository. +- `ReleaseDate` - The publish date of the release on GitHub. +- `ReleaseNotesUrl` - The URL to the release notes on GitHub. +- `PackageUrl` - The URL to the package GitHub repository. +- `PublisherUrl` - The URL to the publisher's GitHub page. +- `PublisherSupportUrl` - The URL to GitHub issues for the package repository. +- `Tags` - The tags from the GitHub repository. +- `Documentations` - If the GitHub repository has a wiki, the URL to the wiki will be added to the manifest. + ### Remaining required fields Like the **PackageIdentifier** you will have the opportunity to accept or modify the remaining fields. @@ -53,6 +68,7 @@ Like the **PackageIdentifier** you will have the opportunity to accept or modify ![new command default values](./images/create-defaults.png) ### Review Changes + Once you have successfully filled in the details, fields, **Winget-Create** will display the results for you to review. ![new command review](./images/create-review.png) diff --git a/doc/update.md b/doc/update.md index 075840cd..457a750e 100644 --- a/doc/update.md +++ b/doc/update.md @@ -5,7 +5,7 @@ The **update** command of the [Winget-Create](../README.md) tool is designed to ## Usage -`wingetcreate.exe update [-u ] [-v ] [-s] [-t ] [-o ] [-p ] [-r] []` +`wingetcreate.exe update [-u ] [-v ] [-s] [-t ] [-o ] [-p ] [-r] [] [-d ] [--release-date ] [--release-notes-url ] [--format ] [--interactive] [--help]` The **update** command can be called with the installer URL(s) that you wish to update the manifest with. **Please make sure that the number of installer URL(s) included matches the number of existing installer nodes in the manifest you are updating. Otherwise, the command will fail.** This is to ensure that we can deterministically update each installer node with the correct matching installer url provided. @@ -34,6 +34,19 @@ e.g., `wingetcreate update --urls '|x64|user' '|x64|machine' '|x86|user' '|x86|machine'` +### Auto-filling manifest fields + +If the installer URLs come from a GitHub release, the CLI can automatically fill in missing manifest metadata. A valid GitHub token must be provided using the `--token` argument to use this feature. +The update flow may automatically fill in the following fields: + +- `ReleaseDate` - The publish date of the release on GitHub. +- `ReleaseNotesUrl` - The URL to the release notes on GitHub. +- `PackageUrl` - The URL to the package GitHub repository. +- `PublisherUrl` - The URL to the publisher's GitHub page. +- `PublisherSupportUrl` - The URL to GitHub issues for the package repository. +- `Tags` - The tags from the GitHub repository. +- `Documentations` - If the GitHub repository has a wiki, the URL to the wiki will be added to the manifest. + ### Installer URL arguments The following additional arguments can be provided with the installer URL(s): @@ -94,16 +107,19 @@ The following arguments are available: | Argument | Description | |--------------|-------------| -| **id** | Required. Package identifier used to lookup the existing manifest on the Windows Package Manager repo. -| **-u, --urls** | Installer Url(s) used to extract relevant metadata for generating a manifest -| **-v, --version** | Version to be used when updating the package version field. -| **-i, --interactive** | Boolean value for making the update command interactive. If true, the tool will prompt the user for input. Default is false. -| **-o, --out** | The output directory where the newly created manifests will be saved locally -| **-s, --submit** | Boolean value for submitting to the Windows Package Manager repo. If true, updated manifest will be submitted directly using the provided GitHub Token -| **-r, --replace** | Boolean value for replacing an existing manifest from the Windows Package Manager repo. Optionally provide a version or else the latest version will be replaced. Default is false. -| **-p, --prtitle** | The title of the pull request submitted to GitHub. +| **id** | Required. Package identifier used to lookup the existing manifest on the Windows Package Manager repo. | +| **-u, --urls** | Installer Url(s) used to extract relevant metadata for generating a manifest | +| **-v, --version** | Version to be used when updating the package version field. | +| **-d, --display-version** | Version to be used when updating the display version field. Version provided in the installer URL arguments will take precedence over this value. | +| **--release-notes-url** | URL to be used when updating the release notes url field. | +| **--release-date** | Date to be used when updating the release date field. Expected format is "YYYY-MM-DD". | +| **-o, --out** | The output directory where the newly created manifests will be saved locally | +| **-p, --prtitle** | The title of the pull request submitted to GitHub. | +| **-s, --submit** | Boolean value for submitting to the Windows Package Manager repo. If true, updated manifest will be submitted directly using the provided GitHub Token | +| **-r, --replace** | Boolean value for replacing an existing manifest from the Windows Package Manager repo. Optionally provide a version or else the latest version will be replaced. Default is false. | +| **-i, --interactive** | Boolean value for making the update command interactive. If true, the tool will prompt the user for input. Default is false. | | **-f,--format** | Output format of the manifest. Default is "yaml". | -| **-t, --token** | GitHub personal access token used for direct submission to the Windows Package Manager repo. If no token is provided, tool will prompt for GitHub login credentials. +| **-t, --token** | GitHub personal access token used for direct submission to the Windows Package Manager repo. If no token is provided, tool will prompt for GitHub login credentials. | | **-?, --help** | Gets additional help on this command. | ## Submit