forked from lovell/sharp-libvips
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-latest-versions.sh
More file actions
executable file
·65 lines (59 loc) · 2.62 KB
/
check-latest-versions.sh
File metadata and controls
executable file
·65 lines (59 loc) · 2.62 KB
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
#!/usr/bin/env bash
set -e
## Copyright 2017 Lovell Fuller and others.
## SPDX-License-Identifier: Apache-2.0
# Dependency version numbers
source ./versions.properties
# Common options for curl
CURL="curl --silent --location --retry 3 --retry-max-time 30"
# Check for newer versions
ALL_AT_VERSION_LATEST=true
UPDATES=()
version_latest() {
VERSION_SELECTOR="stable_versions"
if [[ "$4" == *"unstable"* ]]; then
VERSION_SELECTOR="versions"
fi
if [[ "$3" == *"/"* ]]; then
VERSION_LATEST=$(git -c 'versionsort.suffix=-' ls-remote --tags --refs --sort='v:refname' https://github.com/$3.git | awk -F'/' 'END{print $3}' | tr -d 'v')
else
VERSION_LATEST=$($CURL "https://release-monitoring.org/api/v2/versions/?project_id=$3" | jq -j ".$VERSION_SELECTOR[0]" | tr '_' '.')
fi
if [ "$VERSION_LATEST" != "" ] && [ "$VERSION_LATEST" != "$2" ]; then
ALL_AT_VERSION_LATEST=false
VERSION_VAR=$(echo "VERSION_$1" | tr [:lower:]- [:upper:]_)
sed -i "s/^$VERSION_VAR=.*/$VERSION_VAR=$VERSION_LATEST/" versions.properties
UPDATES+=("$1")
fi
sleep 1
}
version_latest "aom" "$VERSION_AOM" "17628"
version_latest "archive" "$VERSION_ARCHIVE" "libarchive/libarchive"
version_latest "cairo" "$VERSION_CAIRO" "247"
version_latest "cgif" "$VERSION_CGIF" "dloebl/cgif"
version_latest "exif" "$VERSION_EXIF" "libexif/libexif"
version_latest "expat" "$VERSION_EXPAT" "770"
version_latest "ffi" "$VERSION_FFI" "1611"
version_latest "fontconfig" "$VERSION_FONTCONFIG" "827"
version_latest "freetype" "$VERSION_FREETYPE" "854"
version_latest "fribidi" "$VERSION_FRIBIDI" "fribidi/fribidi"
version_latest "glib" "$VERSION_GLIB" "10024" "unstable"
version_latest "harfbuzz" "$VERSION_HARFBUZZ" "1299"
version_latest "heif" "$VERSION_HEIF" "strukturag/libheif"
version_latest "highway" "$VERSION_HWY" "205809"
version_latest "lcms" "$VERSION_LCMS" "9815"
#version_latest "mozjpeg" "$VERSION_MOZJPEG" "mozilla/mozjpeg" # use commit SHA until next tagged release
version_latest "pango" "$VERSION_PANGO" "11783" "unstable"
version_latest "pixman" "$VERSION_PIXMAN" "3648"
version_latest "png" "$VERSION_PNG" "1705"
version_latest "proxy-libintl" "$VERSION_PROXY_LIBINTL" "frida/proxy-libintl"
version_latest "rsvg" "$VERSION_RSVG" "5420" "unstable"
version_latest "tiff" "$VERSION_TIFF" "1738"
#version_latest "uhdr" "$VERSION_UHDR" "375187" # use commit SHA until next tagged release
version_latest "vips" "$VERSION_VIPS" "5097"
version_latest "webp" "$VERSION_WEBP" "1761"
version_latest "xml2" "$VERSION_XML2" "1783"
version_latest "zlib-ng" "$VERSION_ZLIB_NG" "115592"
if [ "$ALL_AT_VERSION_LATEST" = "false" ]; then
echo "Dependency updates: ${UPDATES[*]}"
fi