new API to get latest stable version

This commit is contained in:
Mikhail Novosyolov 2023-12-06 21:31:15 +03:00
parent c6e8749c1a
commit 692466610d
2 changed files with 4 additions and 3 deletions

View file

@ -9,7 +9,8 @@
# [8] https://github.com/saiarcot895/chromium-ubuntu-build
# Get the version number of latest stable version
# $ curl -s 'https://omahaproxy.appspot.com/all?os=linux&channel=stable' | sed 1d | cut -d , -f 3
# $ curl 'https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Linux&num=1&offset=0' | jq -r '.[] | .version'
# (https://chromiumdash.appspot.com/releases?platform=Linux)
%ifarch %{x86_64} %ix86
%bcond_without gost
%else

4
upd.sh
View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Script to partly automate updating this package
# sudo dnf install /usr/bin/rpmbuild /usr/bin/spectool /usr/bin/rpmspec /usr/bin/git /usr/bin/curl /usr/bin/abf
# sudo dnf install /usr/bin/spectool /usr/bin/rpmspec /usr/bin/curl /usr/bin/abf /usr/bin/jq
set -x
set -e
@ -13,7 +13,7 @@ set -u
spec=chromium-browser-stable.spec
old_version="$(rpmspec -q --srpm --qf '%{version}' "$spec")"
latest_version="$(curl -s 'https://omahaproxy.appspot.com/all?os=linux&channel=stable' | sed 1d | cut -d , -f 3)"
latest_version="$(curl 'https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Linux&num=1&offset=0' | jq -r '.[] | .version' | head -n 1)"
[ -n "$latest_version" ]
if [ "$old_version" = "$latest_version" ]; then
echo "No updates"