microsoft / winget-create

The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
MIT License
489 stars 84 forks source link

`wingetcreate show` command #428

Closed mdanish-kh closed 1 year ago

mdanish-kh commented 1 year ago

Description of the new feature / enhancement

Currently if a user wants to upgrade an existing package, more often than not the user needs to find the existing manifest in the package repository and examine the number of existing installer nodes and InstallerUrls. I propose adding a wingetcreate show <PackageId> command that'll retrieve the latest manifest from the repo and display the manifest preview so that the user doesn't have to leave the winget-create CLI. The output can help the user determine the new InstallerUrls and whether the package requires any scope or arch override.

Proposed technical implementation details

Usage

wingetcreate show <PackageId> [<Options>]

Options

Options Description
--installer-manifest Show only the installer manifest
--locale-manifests Show all the locale manifests only
--version-manifest Show only the version manifest
--version Specify the package version for which you want to display the manifest.

Sample output


~ wingetcreate show Microsoft.WingetCreate

Installer manifest:
# Created using wingetcreate 1.5.1.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.5.0.schema.json

PackageIdentifier: Microsoft.WingetCreate
PackageVersion: 1.5.1.0
InstallerLocale: en-US
MinimumOSVersion: 10.0.17763.0
InstallModes:
- interactive
- silent
Commands:
- wingetcreate
Installers:
- Platform:
  - Windows.Universal
  Architecture: x64
  InstallerType: msix
  Scope: user
  InstallerUrl: https://github.com/microsoft/winget-create/releases/download/v1.5.1.0/Microsoft.WindowsPackageManagerManifestCreator_1.5.1.0_8wekyb3d8bbwe.msixbundle
  InstallerSha256: 9D41F745D65875B9FACD8ADB6F1D615CB57D2A69C0EFD8AA686582FBA0C7C120
  SignatureSha256: 9EC6218AFE4D12830F1E164CE82268F6769831C432ED9CBAFD1B06E7EFDB446C
  UpgradeBehavior: install
  PackageFamilyName: Microsoft.WindowsPackageManagerManifestCreator_8wekyb3d8bbwe
- Platform:
  - Windows.Universal
  Architecture: x86
  InstallerType: msix
  Scope: user
  InstallerUrl: https://github.com/microsoft/winget-create/releases/download/v1.5.1.0/Microsoft.WindowsPackageManagerManifestCreator_1.5.1.0_8wekyb3d8bbwe.msixbundle
  InstallerSha256: 9D41F745D65875B9FACD8ADB6F1D615CB57D2A69C0EFD8AA686582FBA0C7C120
  SignatureSha256: 9EC6218AFE4D12830F1E164CE82268F6769831C432ED9CBAFD1B06E7EFDB446C
  UpgradeBehavior: install
  PackageFamilyName: Microsoft.WindowsPackageManagerManifestCreator_8wekyb3d8bbwe
- Architecture: x64
  InstallerType: portable
  InstallerUrl: https://github.com/microsoft/winget-create/releases/download/v1.5.1.0/wingetcreate.exe
  InstallerSha256: 26A4521C07540D6EDDCF84D2C979EA6DB1287A22AB3805A04F4E75EA93C57221
- Architecture: x64
  InstallerType: portable
  InstallerUrl: https://github.com/microsoft/winget-create/releases/download/v1.5.1.0/wingetcreate.exe
  InstallerSha256: 26A4521C07540D6EDDCF84D2C979EA6DB1287A22AB3805A04F4E75EA93C57221
ManifestType: installer
ManifestVersion: 1.5.0

Version manifest:
# Created using wingetcreate 1.5.1.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.5.0.schema.json

PackageIdentifier: Microsoft.WingetCreate
PackageVersion: 1.5.1.0
DefaultLocale: en-US
ManifestType: version
ManifestVersion: 1.5.0

Default locale manifest:
# Created using wingetcreate 1.5.1.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.5.0.schema.json

PackageIdentifier: Microsoft.WingetCreate
PackageVersion: 1.5.1.0
PackageLocale: en-US
Publisher: Microsoft Corporation
PublisherUrl: https://www.microsoft.com
PublisherSupportUrl: https://github.com/microsoft/winget-create/issues
PrivacyUrl: https://privacy.microsoft.com/privacystatement
Author: https://github.com/microsoft/winget-create/graphs/contributors
PackageName: Windows Package Manager Manifest Creator
PackageUrl: https://github.com/microsoft/winget-create
License: MIT
LicenseUrl: https://github.com/microsoft/winget-create/blob/main/LICENSE
Copyright: Copyright (c) Microsoft Corporation. All rights reserved.
CopyrightUrl: https://github.com/microsoft/winget-create/blob/main/LICENSE
ShortDescription: The Windows Package Manager Manifest Creator command-line tool
Description: Windows Package Manager Manifest Creator is an Open Source tool designed to help developers create, update, and submit manifest files to the Windows Package Manager repository.
Moniker: wingetcreate
Tags:
- command-line
- manifests-generator
- package-manager
- package-manifests
- windows
- winget
- winget-pkgs
- yaml
Documentations:
- DocumentLabel: CLI Commands Documentation
  DocumentUrl: https://github.com/microsoft/winget-create/tree/main/doc
ManifestType: defaultLocale
ManifestVersion: 1.5.0