microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.52k stars 4.42k forks source link

[New Feature]: Offer a kind of batch mode for YamlCreate.ps1 #97773

Open borque opened 1 year ago

borque commented 1 year ago

Description of the new feature/enhancement

Some software projects offer a large amount of different languages and installer types. I am thinking of Mozilla here especially. When using YamlCreate.ps1 in Quick-Update-Mode to update a manifest it is quiet time consuming to manually copy and paste all new URLs for each single item. A kind of batch mode might be helpful.

Proposed technical implementation details (optional)

IMO a quick and easy solution: Offer an option to either specify a text file containing all new URLs. Either simply the URLs as CSV as sorted in the manifest or a bit mor complex like the following: ` x64 msi en-US https://download-installer.cdn.mozilla.net/pub/firefox/releases/102.8.0/Win64/en-US/Firefox%20Setup%20102.8.0.msi,

x86 msi en-US https://download-installer.cdn.mozilla.net/pub/firefox/releases/102.8.0/Win32/en-US/Firefox%20Setup%20102.8.0.msi

x64 exe en-US https://download-installer.cdn.mozilla.net/pub/firefox/releases/102.8.0/Win64/en-US/Firefox%20Setup%20102.8.0.exe

...

x64 msi de-DE https://download-installer.cdn.mozilla.net/pub/firefox/releases/102.8.0/Win64/de/Firefox%20Setup%20102.8.0.msi

... `

More flexible but even complex: Offer additional variables for such a text file. The following is just a rough thought which will not work for various reasons: ` [Version] 102.8.0esr

[Languages] en-US,en-GB,de-DE,ja-JP, ...

[Architectures] x86,x64,arm64, ...

[InstallerTypes] exe,msi, ...

[URL] https://download-installer.cdn.mozilla.net/pub/firefox/releases/%Version%/%Architectures%/%Languages%/Firefox%20Setup%20%Version%.%InstallerTypes% `

Trenly commented 1 year ago

I'm currently working on a version 3.0 of YamlCreate which will support taking in updates as objects; This would allow you to create a JSON file with all the information and then pipe the output of ConvertFrom-JSON directly to YamlCreate

vedantmgoyal9 commented 1 year ago

Well, any ETA for it?

Trenly commented 1 year ago

Not yet. University is taking a lot of my time

upintheairsheep commented 1 year ago

I'm currently working on a version 3.0 of YamlCreate which will support taking in updates as objects; This would allow you to create a JSON file with all the information and then pipe the output of ConvertFrom-JSON directly to YamlCreate

Can you also do some sort of HTML5 version for yamlcreate?

Trenly commented 1 year ago

Can you also do some sort of HTML5 version for yamlcreate?

No. I'm not able to. Anyone else can if they choose to

upintheairsheep commented 1 year ago

You could make it a GitHub action

On Tuesday, February 28, 2023, Vedant @.***> wrote:

I'm currently working on a version 3.0 of YamlCreate which will support taking in updates as objects; This would allow you to create a JSON file with all the information and then pipe the output of ConvertFrom-JSON directly to YamlCreate

Can you also do some sort of HTML5 version for yamlcreate?

I can integrate it into my web app but a server has to be setup which I can't afford.

— Reply to this email directly, view it on GitHub https://github.com/microsoft/winget-pkgs/issues/97773#issuecomment-1449487430, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNKRXE5WR5RZLGDGNLIDQLWZ334HANCNFSM6AAAAAAVHZTIIM . You are receiving this because you commented.Message ID: @.***>

upintheairsheep commented 1 year ago

First, it is part of the project so it falls under the Actions ToS and it has to be approved first

On Wednesday, March 1, 2023, Vedant @.***> wrote:

That will be a bad idea since it will take ~30 seconds to get the manifest and since I'm on the Hobby plan of Vercel, and the maximum limit of a function is 10 seconds. Also, it will be a risky method since:

  • Anyone will be able to trigger the workflow, and when more users will use it, then the GitHub repo can also be disabled due to very exceptionally high number of workflow runs.
  • Someone could fill in a URL of a malicious executable because of which the secrets can also be leaked.

Hence, the best solution would be to create a docker image and run that with parameters on a server. It will take very few seconds to get the manifest and would be also secure.

— Reply to this email directly, view it on GitHub https://github.com/microsoft/winget-pkgs/issues/97773#issuecomment-1451313570, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNKRXHHKRK57JU7OFPOCLTW2AUFRANCNFSM6AAAAAAVHZTIIM . You are receiving this because you commented.Message ID: @.***>

The-Running-Dev commented 10 months ago

For a GitHub action, this might do. https://github.com/vedantmgoyal2009/winget-releaser