From c978a0e3f637c151965750d5bb04b6b1af899651 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 16 Dec 2022 07:27:22 +0100 Subject: [PATCH] tools: Use GitHub API in debian/watch The /releases page has become JavaScript-y recently and thus unreadable by machines. Scan the API instead and construct a download URL. --- tools/debian/watch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/debian/watch b/tools/debian/watch index 36512ac1893..cfbae0b1245 100644 --- a/tools/debian/watch +++ b/tools/debian/watch @@ -1,2 +1,5 @@ version=4 -https://github.com/cockpit-project/cockpit/releases/ .*/cockpit-([\d\.]+)\.tar\.xz +opts="searchmode=plain, \ +filenamemangle=s/.+\/@PACKAGE@-@ANY_VERSION@.tar.gz/@PACKAGE@-$1\.tar\.xz/" \ +https://api.github.com/repos/cockpit-project/@PACKAGE@/releases \ +https://github.com/cockpit-project/@PACKAGE@/releases/download/\d[\.\d]*/@PACKAGE@-@ANY_VERSION@.tar.xz