]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
github-releases: add a class that consolidates version checks
authorAlexander Kanavin <alex.kanavin@gmail.com>
Tue, 27 Sep 2022 12:09:20 +0000 (14:09 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Sep 2022 06:59:35 +0000 (07:59 +0100)
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>
meta/classes-recipe/github-releases.bbclass [new file with mode: 0644]

diff --git a/meta/classes-recipe/github-releases.bbclass b/meta/classes-recipe/github-releases.bbclass
new file mode 100644 (file)
index 0000000..ed83b83
--- /dev/null
@@ -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+)+)"