-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto generate manifests for newer versions #500
Comments
Scoop also has their own implementation of this: https://github.com/lukesampson/scoop/wiki/App-Manifest-Autoupdate |
If we settle on an implementation archtecture I think the community would be excited to help. I also think this is something to put on the v1 backlog. I was thinking of something like: Every package (which has its own folder inside the template:
Id: GitHub.cli
Name: GitHub CLI
AppMoniker: gh
InstallerType: MSI
updaters:
- arch: x64
uses: updater-github-releases
with:
repository: 'cli/cli'
regex: '*_windows_amd64.msi'
- arch: x86
uses: updater-github-releases
with:
repository: 'cli/cli'
regex: '*_windows_386.msi' And then, This enables people to create every kind of plugin, and this way making them reusable without having to share code. People could create plugins which are applicable for a single distributor, but for that case, we can also have some generic plugins, such as updaters:
- arch: x64
uses: updater-html-webscrap
with:
url: https://contoso.com/download
versionFilter: '.list-group-item:contains(version)'
downloadUrl: "https://contoso.com/download/contoso_${{ version }}_amd64.msi" These plugins must return some values, such as These plugins could be |
And then, a new project called It needs to be a CLI which can be called passing the
|
And finally, to write a CI pipeline (#1515) which would:
And then the process goes as usual:
|
@felipecassiors sounds awesome if you ask me |
+1 to the idea of adding in some automatic way of registering for updates of our package from Github. I was thinking of adding in a winget package for the Pack CLI (buildpacks/pack#707), and it would be great to minimize the number of steps necessary to keep it updated (so we don't have to do something like this: nodejs/node#34014) |
I think that the |
We have started the work for this feature. The first instance of this automation is related to packages that are distributed through a "vanity URL". If the installer changes, the SHA256 becomes invalid. We run a recurring scan on all manifests. If the package has changed, we will generate a new manifest and run the validation. Assuming all of that passes, the new manifest is merged, and the new version is available. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Please don't close this. |
The message from the bot wasn't correct. The issue will not be auto closed unless it has the "Needs-author-feedback" and hasn't had any activity for 7 days after the "Status: no recent activity" label has been added. This will not be auto closed based on the current bot rules. |
I'm glad that we now have the current auto update solution for packages that have vanity/static urls (especially the ones only distributed via vanity url). I'm looking forward to it being becoming just as capable as scoop's method for autoupdating packages. |
i.e. qbittorrent is at version 4.3.5, but using the link with your browser https://sourceforge.net/projects/qbittorrent/files/latest/download will provide version 4.3.4.1 despite the newer version being listed in the files for the project. |
I think the use of "latest" URL should always be avoided when possible, to keep the manifests installable even when using an old version. |
I would call them "permalinks" rather than "vanity URLs". This feature can be useful if the update can't be included in the app's build toolchain, but it could lead to periods where |
@Jaifroid, we've been using the term "vanity URL" for quite some time. I don't think "permalink" is necessarily better. In most of the cases I've encountered permalinks are just static URLs to a specific web page, blog, etc. I'd think of a permalink to an installer as more of a URL that points to an individual version of an installer that would never change. That's actually what we would prefer to have so we can continue making "earlier" versions of installers available via the Windows Package Manager. |
OK, I stand corrected! |
I've had a couple of threads with @vedantmgoyal2009 on this. I'd like to find a way to incorporate this directly into winget-pkgs to bring the automation side by side with manifests. We have a few other priorities right now, but it's almost exactly as we had thought about building it. I think the main difference is the naming for some of the JSON keys. It is amazing work! |
what is the status of this feature? |
This is partially implemented. For packages with "vanity URLs" we automatically check daily and if the hash has changed, we submit a new manifest. External automation like what has been built by @vedantmgoyal2009 is something we're looking to directly incorporate, but we have other priorities currently. Ideally, publishers will automate publishing their manifests. We've had several iterations of wingetcreate and other projects have already built GitHub actions leveraging that tool like PowerToys and Oh My Posh. |
See also: Komac and Winget Releaser |
@denelon That is nice, but how do you know wether a URL is "vanity" or not? I assume "vanity" is that there is a reference to a version denoted in the url, but how do you detect that automatically? (Or is vanity URLs something else?!) Looking forward to see this extended to a URL and RegEx or URL+ XPath for version check of "non-vanity" URLs as suggest in 15656 Nice to see how winget progresses. |
"Vanity" is something like "foo.com/download/setup.exe". The URL never changes, but the software at that URL does. When there is a version in the URL, it's easier to reason about, and in general the software at that URL does not change. These are the ones we prefer as we are able to maintain older versions of software in the repository. I don't think we want regex in the manifest. We might consider evaluating regular expressions in tooling to help keep things updated in the future. That's some of the forward thinking about how we might detect when newer versions of software are available. This of course assumes semantic versioning so we can search for "(x+1).0.0" or "1.(x+1).0" or "1.0.(x+1)". |
I agree with this, as I recently learned that scoop's method of auto updating is done via a github action running a powershell script that lives in the bucket repository. At best autoupdate regex could live as a separate file within the package's directory but it's not information the client or the user needs to know or act on - just the updater. It's when the regex breaks that someone has to pay attention to it (i.e. site format change, switched source code host, new non-semver version format, etc.) - and it can get complicated pretty quickly despite scoop providing all sorts of variables to enable it. The way scoop does it currently makes it harder for the average user to contribute the programs they use since autoupdate and checkver are outright required for manifests, but that in turn has kept their repos up to date even in periods when the maintainer was absent. I don't think there's a single good answer at the moment but making it easier for people to contribute on their own via interactive tools like komac and the existing automated solutions (wingetreleaser, winget update action, etc.) has a more immediate impact. |
Sometimes the setup also having a payload which redirect to the setup location https://download.geogebra.org/installers/6.0/ |
I've tried this, and I see that it downloads every file in the directory, so I'm not sure how that helps. Anyways, the solution for that case is to parse the version from https://download.geogebra.org/installers/6.0/version.txt and fetch the installer URL from there. See https://github.com/ScoopInstaller/Extras/blob/7b1cbb0b29cc0e3fffbd9e392834b2cdd115a1b4/bucket/geogebra.json#L39-L47 |
I think so but if you keep the app previously for a little while. Because I like to clone web server. If the same file and same size during the next download. wget will respond The file is fully retrieved, nothing to do until it saw a new url in the location.. |
But github was hard to find their application. Could be there is a new package request somewhere around here? |
is this still planned? there are a few package update solutions from the community, and I'd love to contribute if they were centralised/standardised |
Disclaimer
I tried to find an issue like this in both repositories, but I didn't.
Description of the new feature/enhancement
To support some kind of CI that, based on previously set logic, can auto-generate manifests for newer versions of the packages.
Proposed technical implementation details
A very good example is the Chocolatey Automatic Package Updater Module: https://github.com/majkinetor/au
Based on custom rules, such as scripts for finding newer versions, URLs for downloading them, a CI can run continuously based on a scheduled trigger, and if it finds a newer version, it try to build a new manifest automatically, test it, and submit a PR (or push directly).
So then, we don't need to manually create manifests for every new version of an existing package.
The text was updated successfully, but these errors were encountered: