-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gnome-shell): update scripts (#3204)
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ project pkg { | |
} | ||
labels { | ||
subrepo = "extras" | ||
updbranch = 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } | ||
} |