vedantmgoyal9 / winget-releaser

Publish new releases of your application to the Windows Package Manager easily.

Home Page:https://docs.bittu.eu.org/docs/winget-releaser-playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: winget-releaser creates incorrect mapping between Architecture and InstallerUrl

twpayne opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

See https://github.com/microsoft/winget-pkgs/pull/110014/files.

Short version:

  • PR automatically created by winget-releaser.
  • The PR is clearly incorrect: in the Installers section, there are four different Architectures (x64, x86, arm, arm64) and yet all four InstallerUrls point at the same amd64 zip file with the same SHA256 hash.

The winget-releaser action used to create this PR is:
https://github.com/twpayne/chezmoi/blob/30f5995ec56381c27cfa238dc48fe8024eae0f29/.github/workflows/winget.yml

I would expect winget-releaser to use the architecture-appropriate zip file for each Architecture. All zip files are available as release assets in https://github.com/twpayne/chezmoi/releases/tag/v2.34.2.

Please let me know how I can help debug/resolve this issue.

I have the same issue with this PR automatically created by winget-releaser. It selected the ARM64 installer for all architectures.

The GitHub workflow is here: https://github.com/t1m0thyj/WinDynamicDesktop/blob/main/.github/workflows/release-winget.yml

There is a separate installer for each architecture:
image

commented

I will update the action to use the previous release of Komac until the bug is fixed over there. (russellbanks/Komac#215)

commented

I apologize for the inconvenience caused. Could you please try to re-run the workflow jobs to create a fresh PR? Hopefully, this should create the correct PRs.

Same thing happened to vim last week https://github.com/vim/vim-win32-installer/actions/runs/5273078475/jobs/9536084416

Unfortunately now new runs keep failing with "The number of unique installer urls is greater than the number of previous manifest urls", not sure if this is related or not :/ russellbanks/Komac#224

commented

It will be automatically fixed once microsoft/winget-pkgs#110397 is merged.

There has been no new version of winget-releaser since this was fixed, so users using the latest major of winget-releaser are still experiencing this bug.

Refs microsoft/winget-pkgs#111215.

There has been no new version of winget-releaser since this was fixed, so users using the latest major of winget-releaser are still experiencing this bug.

@twpayne, I believe this was due to a regex bug in 1.8.0 of Komac. This is fixed now that WinGet Releaser has updated to 1.8.1. Here was my test:

java -jar Komac-1.8.1-all.jar update --id 'twpayne.chezmoi' --version 2.34.3 --urls 'https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_arm64.zip,https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_i386.zip,https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_arm.zip,https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_amd64.zip'
# Created with Komac v1.8.1
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.4.0.schema.json

PackageIdentifier: twpayne.chezmoi
PackageVersion: 2.34.3
InstallerType: zip
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: chezmoi.exe
  PortableCommandAlias: chezmoi
Installers:
- Architecture: x86
  InstallerUrl: https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_i386.zip
  InstallerSha256: 03FDC9413DA849D03A386DF9F02254FE48C1EEF712148F375A2C4B0D21A962FD
- Architecture: x64
  InstallerUrl: https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_amd64.zip
  InstallerSha256: 8DFC6B2F46FA86B00A20B8C1C86707813317660165D72A29263CB05A652BEACC
- Architecture: arm
  InstallerUrl: https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_arm.zip
  InstallerSha256: 4D70FE69162FF5C76C4A74AE9AA3C6B1F07BD80AB25C2F91326E7721FA990704
- Architecture: arm64
  InstallerUrl: https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_arm64.zip
  InstallerSha256: 1F888B8F731AD14D987B6B7A0B7C0313E1E263C3C0741FD32E22F468C20DFAFD
ManifestType: installer
ManifestVersion: 1.4.0

This is confusing:

The latest release of Winget Releaser is v2, which was released on February 12 and obviously does not contain this bug fix from June: https://github.com/vedantmgoyal2009/winget-releaser/releases

However, it looks like the v2 tag itself was moved recently: https://github.com/vedantmgoyal2009/winget-releaser/tags

If Winget Releaser is moving tags around then it's likely to confuse a lot of systems and people. Winget Releaser should not move tags and should use semantic versioning instead.

@vedantmgoyal2009 was this supposed to be fixed? It still happened to the Vim Deployment yesterday: microsoft/winget-pkgs#111716

@chrisbra This is apparently fixed but there has been no new release with the fix yet. You could pin your use of the GitHub action to a specific commit to get it, but v2 of winget-releaser is still broken.

so instead of using @v2 using @f5fe57eeed3b1d0ece9116be65c80c5c53354db9 should fix it?

Yes, exactly.

thanks, will do

@chrisbra I've spent some time looking into this. The URL https://github.com/vim/vim-win32-installer/releases/download/v9.0.1677/gvim_9.0.1677_x64.exe was being identified as an x86 installer because of the win32 in vim-win32-installer. I've created a fix to use the architecture most towards the end of the URL, as that's where they usually are.

thank you! But that also means I need to await an update here from @vedantmgoyal2009 right?

thank you! But that also means I need to await an update here from @vedantmgoyal2009 right?

WinGet Releaser uses the latest version of Komac, so I just need to make a release. I've created #187 as a feature request for scenarios like this where you might want to temporarily use the nightly release or a slightly older version if there's an issue affecting your package.

@all-contributors please add @twpayne for bug