qchateau / conan-center-bot

A bot to automatically update conan-center-index
GNU General Public License v3.0
11 stars 2 forks source link

use GitHub releases tarballs #108

Closed ericLemanissier closed 1 month ago

ericLemanissier commented 1 year ago

fixes https://github.com/qchateau/conan-center-bot/issues/106

This is based on top of https://github.com/qchateau/conan-center-bot/pull/107 to ease my tests, but the change in ccb/upstream_project.py is totally independant from github workfows modifications.

Contrary to other Upstream sub-classes, I had to do the request in GithubReleaseProject constructor (as opposed to the versions(self) property), because we have to know if there are some actual releases during construction, in order to try other Upstream types if there are no actual releases. This also implies that if the token becomes rate limited, the exception is caught, and other Upstream types are tried. Also, releases tarball download URL cannot be derived from version alone, so I cached the download url as member of the Version object. I could not cache it in the GithubReleaseProject instance because several instances of the detected Upstream are created for each recipe during a single workflow.

Examples of branches created by this modification:

qchateau commented 1 year ago

I wonder why the CI doesn't run on this PR

ericLemanissier commented 1 year ago

Afaiu, the workflows in this repo never build PR, only branches. That said, tou can take a look at CI on my fork

qchateau commented 1 year ago

Hum, right, PR from forks don't trigger the CI then. Do you mind enabling the CI on PRs ? Seems somewhat related to your work to make forks usable

ericLemanissier commented 1 year ago

ok, I'm finally starting to get some results on my fork : https://ericlemanissier.github.io/conan-center-bot/