Skip to content

Commit

Permalink
feat(ffmpeg): track tesseract and x265 version per branch
Browse files Browse the repository at this point in the history
fixes #2611
  • Loading branch information
madonuko committed Dec 23, 2024
1 parent 21222f0 commit d2f6bfa
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
1 change: 1 addition & 0 deletions anda/fusion/ffmpeg/VERSION_tesseract.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.5.0
1 change: 1 addition & 0 deletions anda/fusion/ffmpeg/VERSION_x265.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.1
3 changes: 3 additions & 0 deletions anda/fusion/ffmpeg/anda.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ project pkg {
rpm {
spec = "ffmpeg.spec"
}
labels {
updbranch = 1
}
}
20 changes: 20 additions & 0 deletions anda/fusion/ffmpeg/update.rhai
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
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").write(ffmpeg_ver);

let release = labels.branch;
if release.starts_with("el") {
release.crop(2);
if release == "10" {
release = "EPEL-10.0"
} else {
release = `EPEL-${release}`;
}
} else if release.starts_with("f") {
release = labels.nbranch;
} else {
print(`ffmpeg: unsupported branch: ${labels.branch}`);
terminate();
}
let tesseract_ver = get(`https://bodhi.fedoraproject.org/updates/?search=tesseract&status=stable&releases=${release}&rows_per_page=1&page=1`).json().updates[0].title;
open_file("anda/fusion/ffmpeg/VERSION_tesseract.txt").write(tesseract_ver);
13 changes: 11 additions & 2 deletions anda/system/mesa-freeworld/update.rhai
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
if !labels.branch.starts_with("f") {
let release = labels.branch;
if release.starts_with("el") {
release.crop(2);
if release == "10" {
release = "EPEL-10.0"
} else {
release = `EPEL-${release}`;
}
} else if release.starts_with("f") {
release = labels.nbranch;
} else {
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));

0 comments on commit d2f6bfa

Please sign in to comment.