-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcheck-versions.sh
executable file
·73 lines (64 loc) · 2.59 KB
/
check-versions.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
set -e
my_dir="$(dirname "$0")"
versions_file="$my_dir/versions.sh"
source $versions_file
version_entry() {
echo "export $1_VERSION=$2"
}
update_version() {
name=$1
old_version=$2
new_version=$3
if [ "$new_version" != "$old_version" ]; then
old_entry=$(version_entry $name $old_version)
new_entry=$(version_entry $name $new_version)
sed -i '' "s/$old_entry/$new_entry/g" "$versions_file"
echo "$name. Latest version: $new_version. Current version: $old_version"
fi
}
check_version() {
name=$1
old_version=$2
new_version=$(curl -s https://release-monitoring.org/api/project/$3 | jq -r '.versions | map(select(match("^[0-9]+(\\.[0-9]+)*$")))[0]')
update_version $name $old_version $new_version
}
check_version_github() {
name=$1
old_version=$2
new_version=$(curl -sL https://api.github.com/repos/$3/releases | jq -r 'map(select(.prerelease == false)) | map(select(.draft == false)) | map(.tag_name)[0] | ltrimstr("v") | ltrimstr("V")')
update_version $name $old_version $new_version
}
check_version "GOLANG" $GOLANG_VERSION "1227"
check_version_github "ZLIB" $ZLIB_VERSION "zlib-ng/zlib-ng"
check_version "BROTLI" $BROTLI_VERSION "15235"
check_version "FFI" "$FFI_VERSION" "1611"
check_version "GLIB" $GLIB_VERSION "10024"
check_version "HIGHWAY" $HIGHWAY_VERSION "205809"
check_version_github "QUANTIZR" $QUANTIZR_VERSION "Darthsim/quantizr"
check_version "LIBEXPAT" $LIBEXPAT_VERSION "770"
check_version "LIBXML2" $LIBXML2_VERSION "1783"
check_version "LIBEXIF" $LIBEXIF_VERSION "1607"
check_version "LCMS2" $LCMS2_VERSION "9815"
check_version "LIBJPEGTURBO" $LIBJPEGTURBO_VERSION "1648"
check_version "LIBJXL" $LIBJXL_VERSION "232764"
check_version "LIBPNG" $LIBPNG_VERSION "15294"
check_version "LIBSPNG" $LIBSPNG_VERSION "24289"
check_version "LIBWEBP" $LIBWEBP_VERSION "1761"
check_version "LIBTIFF" $LIBTIFF_VERSION "1738"
check_version_github "CGIF" $CGIF_VERSION "dloebl/cgif"
check_version "LIBDE265" $LIBDE265_VERSION "11239"
check_version "KVAZAAR" $KVAZAAR_VERSION "12418"
check_version "DAV1D" $DAV1D_VERSION "18920"
# check_version "RAV1E" $RAV1E_VERSION "75048"
check_version "AOM" $AOM_VERSION "17628"
check_version "LIBHEIF" $LIBHEIF_VERSION "64439"
check_version "FREETYPE" $FREETYPE_VERSION "854"
check_version "FONTCONFIG" $FONTCONFIG_VERSION "827"
check_version "HARFBUZZ" $HARFBUZZ_VERSION "1299"
check_version "PIXMAN" $PIXMAN_VERSION "3648"
check_version "CAIRO" $CAIRO_VERSION "247"
check_version "FRIBIDI" $FRIBIDI_VERSION "857"
check_version "PANGO" $PANGO_VERSION "11783"
check_version "LIBRSVG" $LIBRSVG_VERSION "5420"
check_version "VIPS" $VIPS_VERSION "5097"