summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-09-27 14:09:20 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-28 07:59:35 +0100
commitafa57a02ecd12ad176302d9631f4181b26d94f5c (patch)
treef9736bf76b017ee60a399011f570c740a7ad9669 /meta
parent98c40271692147873a622e168e8b2e90a9fcc54c (diff)
downloadopenembedded-core-contrib-afa57a02ecd12ad176302d9631f4181b26d94f5c.tar.gz
github-releases: add a class that consolidates version checks
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> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-recipe/github-releases.bbclass3
1 files changed, 3 insertions, 0 deletions
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/"
+UPSTREAM_CHECK_URI ?= "${GITHUB_BASE_URI}"
+UPSTREAM_CHECK_REGEX ?= "releases/tag/v?(?P<pver>\d+(\.\d+)+)"