Skip to content

Commit

Permalink
Generate versions.json
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Nov 1, 2023
1 parent a52d71a commit 1c66414
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,30 @@ VERSION_AOM=3.7.0 # https://aomedia.googlesource.com/aom
VERSION_HEIF=1.17.1 # https://github.com/strukturag/libheif
VERSION_VIPS=8.14.5 # https://github.com/libvips/libvips

# Generate versions.json
( printf "{\n"; \
[ -n "$DISABLE_AVIF" ] || printf " \"aom\": \"${VERSION_AOM}\",\n"; \
[ -n "$DISABLE_JXL" ] || printf " \"brotli\": \"${VERSION_BROTLI}\",\n"; \
printf " \"cgif\": \"${VERSION_CGIF}\",\n"; \
printf " \"exif\": \"${VERSION_EXIF}\",\n"; \
printf " \"expat\": \"${VERSION_EXPAT}\",\n"; \
printf " \"ffi\": \"${VERSION_FFI}\",\n"; \
printf " \"glib\": \"${VERSION_GLIB}\",\n"; \
[ -n "$DISABLE_AVIF" ] || printf " \"heif\": \"${VERSION_HEIF}\",\n"; \
[ -n "$DISABLE_JXL" ] || printf " \"highway\": \"${VERSION_HWY}\",\n"; \
printf " \"imagequant\": \"${VERSION_IMAGEQUANT}\",\n"; \
[ -n "$DISABLE_JXL" ] || printf " \"jxl\": \"${VERSION_JXL}\",\n"; \
printf " \"lcms\": \"${VERSION_LCMS2}\",\n"; \
printf " \"mozjpeg\": \"${VERSION_MOZJPEG}\",\n"; \
[ -n "$DISABLE_SVG" ] || printf " \"resvg\": \"${VERSION_RESVG}\",\n"; \
printf " \"spng\": \"${VERSION_SPNG}\",\n"; \
printf " \"tiff\": \"${VERSION_TIFF}\",\n"; \
printf " \"vips\": \"${VERSION_VIPS}\",\n"; \
printf " \"webp\": \"${VERSION_WEBP}\",\n"; \
printf " \"zlib-ng\": \"${VERSION_ZLIB_NG}\"\n"; \
printf '}'; ) \
>$TARGET/versions.json

# Remove patch version component
without_patch() {
echo "${1%.[[:digit:]]*}"
Expand Down

0 comments on commit 1c66414

Please sign in to comment.