> -----Original Message-----
> From: [email protected] 
> <[email protected]> On Behalf Of Alexander Kanavin
> Sent: den 27 september 2022 14:09
> To: [email protected]
> Cc: Alexander Kanavin <[email protected]>
> Subject: [OE-core] [PATCH 1/3] githib-releases: add a class that consolidates 
> version checks

Change "githib" to "github".

> 
> github has recently changed how the releases page is structured:
> the tarballs are no longer listed directly, but are included
> via separate 'fragment' URIs. For now, we can change the check
> to match against the release tags.
> 
> This also establishes a common base URI to use for both
> fetching and checking the latest version.
> 
> Signed-off-by: Alexander Kanavin <[email protected]>
> ---
>  meta/classes-recipe/github-releases.bbclass | 3 +++
>  1 file changed, 3 insertions(+)
>  create mode 100644 meta/classes-recipe/github-releases.bbclass
> 
> diff --git a/meta/classes-recipe/github-releases.bbclass 
> b/meta/classes-recipe/github-releases.bbclass
> new file mode 100644
> index 0000000000..ed83b83731
> --- /dev/null
> +++ b/meta/classes-recipe/github-releases.bbclass
> @@ -0,0 +1,3 @@
> +GITHUB_BASE_URI ?= "https://github.com/${BPN}/${BPN}/releases/";

Is that really useful? It cannot be many recipes where the owner 
part of the URL actually matches ${BPN}? Wouldn't it make more 
sense to instead use something like:

GITHUB_OWNER ?= "${BPN}"
GITHUB_NAME ?= "${BPN}"
GITHUB_BASE_URI ?= "https://github.com/${GITHUB_OWNER}/${GITHUB_NAME}/releases/";

That way it is more evident in the recipe when GITHUB_OWNER and/or 
GITHUB_NAME is set, rather than the entire GITHUB_BASE_URI being 
redefined.

> +UPSTREAM_CHECK_URI ?= "${GITHUB_BASE_URI}"
> +UPSTREAM_CHECK_REGEX ?= "releases/tag/v?(?P<pver>\d+(\.\d+)+)"
> --
> 2.30.2

//Peter

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171103): 
https://lists.openembedded.org/g/openembedded-core/message/171103
Mute This Topic: https://lists.openembedded.org/mt/93948089/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to