Files
packages/anda/themes/lightly-qt5/update.rhai
T
Raboneko ed4ad740f0 fix(lightly-qt5): Import andax/bump_extras.rhai for update.rhai (#4535) (#4540)
(cherry picked from commit 1876927c99)

Signed-off-by: Gilver <rockgrub@disroot.org>
Co-authored-by: Gilver <rockgrub@disroot.org>
2025-04-29 12:31:47 -05:00

15 lines
579 B
Plaintext

import "andax/bump_extras.rhai" as bump;
fn main(labels) {
let branch = bump::as_bodhi_ver(labels.branch);
let url = `https://bodhi.fedoraproject.org/updates/?search=qt5-5.&status=stable&releases=${branch}&rows_per_page=1&page=1`;
for entry in get(url).json().updates[0].title.split(' ') {
let matches = find_all(`qt5-([\d.]+)-(\d+)\.[\w\d]+$`, entry);
if matches.len() != 0 {
return matches[0][1].split(".")[1];
}
}
}
open_file("anda/themes/lightly-qt5/VER5.txt").write(`${main(labels)}`); // will trig rebuild when changed