All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: RE: [OE-core] [PATCH 1/3] githib-releases: add a class that consolidates version checks
Date: Tue, 27 Sep 2022 14:17:53 +0000	[thread overview]
Message-ID: <74fb01f41d54453992cbd6ccad52a9ce@axis.com> (raw)
In-Reply-To: <20220927120922.137422-1-alex@linutronix.de>

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Alexander Kanavin
> Sent: den 27 september 2022 14:09
> To: openembedded-core@lists.openembedded.org
> Cc: Alexander Kanavin <alex@linutronix.de>
> 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 <alex@linutronix.de>
> ---
>  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



  parent reply	other threads:[~2022-09-27 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 12:09 [PATCH 1/3] githib-releases: add a class that consolidates version checks Alexander Kanavin
2022-09-27 12:09 ` [PATCH 2/3] meta: fix version checks in all github recipes using the github-releases class Alexander Kanavin
2022-09-27 12:09 ` [PATCH 3/3] virglrenderer: use https for fetching from gitlab Alexander Kanavin
2022-09-27 14:17 ` Peter Kjellerstedt [this message]
2022-09-27 16:47   ` [OE-core] [PATCH 1/3] githib-releases: add a class that consolidates version checks Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74fb01f41d54453992cbd6ccad52a9ce@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.