Skip to content

Commit d24155b

Browse files
committed
Immich.sh: fix versioned json paths
1 parent 6063fac commit d24155b

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

ct/immich.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ function update_script() {
4646
rm ~/Dockerfile
4747
fi
4848
if [[ -f ~/.immich_library_revisions ]]; then
49-
curl -fsSLO https://raw.githubusercontent.com/immich-app/base-images/refs/heads/main/server/bin/build-lock.json
50-
jq -cr '.sources[].revision' ./build-lock.json >~/.new_revisions
49+
libraries=("libjxl" "libheif" "libraw" "imagemagick" "libvips")
50+
for library in "${libraries[@]}"; do
51+
curl -fsSLO https://raw.githubusercontent.com/immich-app/base-images/refs/heads/main/server/sources/"$library".json
52+
jq -cr '.revision' ./"$library".json >>~/.new_revisions
53+
done
5154
readarray -t UPDATED_REVISIONS < <(comm -13 <(sort ~/.immich_library_revisions) <(sort ~/.new_revisions))
5255
if [[ "${#UPDATED_REVISIONS[@]}" -gt 0 ]]; then
5356
readarray -t NAMES < <(for revision in "${UPDATED_REVISIONS[@]}"; do
@@ -64,13 +67,13 @@ function update_script() {
6467
SOURCE=${SOURCE_DIR}/libjxl
6568
JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
6669
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"
67-
: "${LIBJXL_REVISION:=$(jq -cr '.sources[] | select(.name == "libjxl").revision' $BASE_DIR/server/bin/build-lock.json)}"
70+
: "${LIBJXL_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libjxl.json)}"
6871
$STD git clone https://github.com/libjxl/libjxl.git "$SOURCE"
6972
cd "$SOURCE"
7073
$STD git reset --hard "$LIBJXL_REVISION"
7174
$STD git submodule update --init --recursive --depth 1 --recommend-shallow
72-
$STD git apply "$BASE_DIR"/server/bin/patches/jpegli-empty-dht-marker.patch
73-
$STD git apply "$BASE_DIR"/server/bin/patches/jpegli-icc-warning.patch
75+
$STD git apply "$BASE_DIR"/server/sources/libjxl-patches/jpegli-empty-dht-marker.patch
76+
$STD git apply "$BASE_DIR"/server/sources/libjxl-patches/jpegli-icc-warning.patch
7477
mkdir build
7578
cd build
7679
$STD cmake \
@@ -102,7 +105,7 @@ function update_script() {
102105
if [[ "$name" == "libheif" ]]; then
103106
msg_info "Recompiling libheif"
104107
SOURCE=${SOURCE_DIR}/libheif
105-
: "${LIBHEIF_REVISION:=$(jq -cr '.sources[] | select(.name == "libheif").revision' $BASE_DIR/server/bin/build-lock.json)}"
108+
: "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}"
106109
$STD git clone https://github.com/strukturag/libheif.git "$SOURCE"
107110
cd "$SOURCE"
108111
$STD git reset --hard "$LIBHEIF_REVISION"
@@ -128,7 +131,7 @@ function update_script() {
128131
if [[ "$name" == "libraw" ]]; then
129132
msg_info "Recompiling libraw"
130133
SOURCE=${SOURCE_DIR}/libraw
131-
: "${LIBRAW_REVISION:=$(jq -cr '.sources[] | select(.name == "libraw").revision' $BASE_DIR/server/bin/build-lock.json)}"
134+
: "${LIBRAW_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libraw.json)}"
132135
$STD git clone https://github.com/libraw/libraw.git "$SOURCE"
133136
cd "$SOURCE"
134137
$STD git reset --hard "$LIBRAW_REVISION"
@@ -144,7 +147,7 @@ function update_script() {
144147
if [[ "$name" == "imagemagick" ]]; then
145148
msg_info "Recompiling ImageMagick"
146149
SOURCE=$SOURCE_DIR/imagemagick
147-
: "${IMAGEMAGICK_REVISION:=$(jq -cr '.sources[] | select(.name == "imagemagick").revision' $BASE_DIR/server/bin/build-lock.json)}"
150+
: "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/imagemagick.json)}"
148151
$STD git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE"
149152
cd "$SOURCE"
150153
$STD git reset --hard "$IMAGEMAGICK_REVISION"
@@ -159,7 +162,7 @@ function update_script() {
159162
if [[ "$name" == "libvips" ]]; then
160163
msg_info "Recompiling libvips"
161164
SOURCE=$SOURCE_DIR/libvips
162-
: "${LIBVIPS_REVISION:=$(jq -cr '.sources[] | select(.name == "libvips").revision' $BASE_DIR/server/bin/build-lock.json)}"
165+
: "${LIBVIPS_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libvips.json)}"
163166
$STD git clone https://github.com/libvips/libvips.git "$SOURCE"
164167
cd "$SOURCE"
165168
$STD git reset --hard "$LIBVIPS_REVISION"

0 commit comments

Comments
 (0)