From 4ad0ab98ca2694c5b4164f6f9bf92f9d36faa581 Mon Sep 17 00:00:00 2001 From: Dipta Biswas <73038615+hazel-bunny@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:51:27 +0000 Subject: [PATCH] Create update.rhai Signed-off-by: Dipta Biswas <73038615+hazel-bunny@users.noreply.github.com> --- anda/themes/lightly-qt5/update.rhai | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 anda/themes/lightly-qt5/update.rhai diff --git a/anda/themes/lightly-qt5/update.rhai b/anda/themes/lightly-qt5/update.rhai new file mode 100644 index 0000000000..4b04183e7c --- /dev/null +++ b/anda/themes/lightly-qt5/update.rhai @@ -0,0 +1,7 @@ +let repos = get("https://repology.org/api/v1/project/qt").json_arr(); +let branch = sh("git rev-parse --abbrev-ref HEAD", #{"stdout": "piped"}).ctx.stdout; +branch.crop(1); +branch.trim(); +let vers = repos.filter(|r| r.repo == `fedora_${branch}`).map(|r| [find("^(\\d+)\\.(\\d+)\\..+$", r.version, 1), find("^(\\d+)\\.(\\d+)\\..+$", r.version, 2)]); +let ver = vers.find(|v| v[0] == "5")[1]; // assume there is only 1 package for v5.x +open_file("anda/themes/lightly-qt5/VER5.txt").write(`${ver}`); // will trig rebuild when changed