feat(ffmpeg): track tesseract and x265 version per branch (#2721)

fixes #2611
This commit is contained in:
madomado
2025-01-01 03:37:34 +08:00
committed by GitHub
parent b05984b5a9
commit 38414e65b6
6 changed files with 39 additions and 8 deletions
+1
View File
@@ -0,0 +1 @@
5.5.0
+1
View File
@@ -0,0 +1 @@
4.1
+3
View File
@@ -2,4 +2,7 @@ project pkg {
rpm {
spec = "ffmpeg.spec"
}
labels {
updbranch = 1
}
}
+9 -1
View File
@@ -1 +1,9 @@
rpm.version(find(`<small>ffmpeg-([\d.]+?)\.tar\.xz</small>`, get("https://ffmpeg.org/download.html"), 1));
import "andax/bump_extras.rhai" as bump;
//rpm.version(find(`<small>ffmpeg-([\d.]+?)\.tar\.xz</small>`, get("https://ffmpeg.org/download.html"), 1));
let ffmpeg_ver = get(`https://madoguchi.fyralabs.com/v4/terra${labels.branch}/packages/x265`).json().ver;
open_file("anda/fusion/ffmpeg/VERSION_x265.txt", "w").write(ffmpeg_ver);
let tesseract_ver = bump::bodhi("tesseract", labels.branch.as_bodhi_ver());
open_file("anda/fusion/ffmpeg/VERSION_tesseract.txt", "w").write(tesseract_ver);
+3 -7
View File
@@ -1,7 +1,3 @@
if !labels.branch.starts_with("f") {
print(`mesa-freeworld: unsupported branch: ${labels.branch}`);
terminate();
}
let release = labels.branch.to_upper();
let ver = get(`https://bodhi.fedoraproject.org/updates/?search=mesa&status=stable&releases=${release}&rows_per_page=1&page=1`).json().updates[0].title;
rpm.global("ver", find(`^mesa-([\d.]+)`, ver, 1));
import "andax/bump_extras.rhai" as bump;
rpm.global("ver", bump::bodhi("mesa", labels.branch.as_bodhi_ver()));
+22
View File
@@ -0,0 +1,22 @@
fn as_bodhi_ver(branch) {
if branch.starts_with("el") {
branch.crop(2);
if branch == "10" {
return "EPEL-10.0";
}
return `EPEL-${release}`;
} else if branch == "frawhide" {
return "42";
} else if branch.starts_with("f") {
branch.crop(1);
return branch;
} else {
print(`E: unsupported branch: ${labels.branch}`);
terminate();
}
}
fn bodhi(pkg, branch) {
let url = `https://bodhi.fedoraproject.org/updates/?search=${pkg}&status=stable&releases=${branch}&rows_per_page=1&page=1`;
return find(`^${pkg}-([\d.]+)-\d+\.[\w\d]+$`, get(url).json().updates[0].title, 1);
}