Skip to content

Commit

Permalink
feat(gnome-shell): update scripts (#3204)
Browse files Browse the repository at this point in the history
  • Loading branch information
madonuko authored Feb 6, 2025
1 parent 7940e83 commit d997cfa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions anda/desktops/gnome/gnome-shell/anda.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ project pkg {
}
labels {
subrepo = "extras"
updbranch = 1
}
}
4 changes: 2 additions & 2 deletions anda/desktops/gnome/gnome-shell/gnome-shell.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%global tarball_version %%(echo %{version} | tr '~' '.')
%global major_version 47
%global minor_version 1
%global minor_version 3

%if 0%{?rhel}
%global portal_helper 0
Expand All @@ -10,7 +10,7 @@

Name: gnome-shell
Version: %{major_version}.%{minor_version}
Release: %autorelease.switcheroo
Release: 1%{?dist}.switcheroo
Summary: Window management and application launching for GNOME

License: GPL-2.0-or-later
Expand Down
25 changes: 25 additions & 0 deletions anda/desktops/gnome/gnome-shell/update.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import "andax/bump_extras.rhai" as bump;

let pkg = "gnome-shell";
let branch = bump::as_bodhi_ver(labels.branch);

let url = `https://bodhi.fedoraproject.org/updates/?search=${pkg}&status=stable&releases=${branch}&rows_per_page=10&page=1`;

let done = false;

for entry in get(url).json().updates {
for entry in entry.title.split(' ') {
let matches = find_all(`${pkg}-([\d.]+)-(\d+)\.[\w\d]+$`, entry);
if matches.len() == 0 { continue; }
let majminv = matches[0][1].split('.');
if majminv.len() != 2 {
print(`gnome-shell: ${matches[0][1]} has invalid version?`);
terminate();
}
rpm.global("major_version", majminv[0]);
rpm.global("minor_version", majminv[1]);
rpm.f = sub(`Release:(\s+)(.+?)\n`, "Release:${1}" + matches[0][2] + "%{?dist}.switcheroo\n", rpm.f);
done = true;
}
if done { break; }
}

0 comments on commit d997cfa

Please sign in to comment.