测试更新脚本

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
新疆萌森软件开发工作室 2024-12-16 10:51:57 +08:00
parent 1acb3c5434
commit 0213b9f8aa
29 changed files with 7 additions and 13 deletions

View File

@ -88,10 +88,8 @@ for docker_compose_file in $docker_compose_files
do do
echo "Processing docker-compose file: $docker_compose_file" echo "Processing docker-compose file: $docker_compose_file"
# 判断 app_name 是否在关联数组中
if [[ -n "${app_keys[$app_name]}" ]]; then if [[ -n "${app_keys[$app_name]}" ]]; then
echo "$app_name is in the app_keys list." echo "$app_name is in the app_keys list."
# 获取对应的 keys
IFS=' ' read -r -a keys <<< "${app_keys[$app_name]}" IFS=' ' read -r -a keys <<< "${app_keys[$app_name]}"
for key in "${keys[@]}"; do for key in "${keys[@]}"; do
echo "Processing key: $key" echo "Processing key: $key"
@ -101,17 +99,15 @@ do
image=$(yq .services.$first_service.image $docker_compose_file) image=$(yq .services.$first_service.image $docker_compose_file)
echo "Found image for service $first_service: $image" echo "Found image for service $first_service: $image"
# 进行后续处理
process_image "$image" "$app_name" process_image "$image" "$app_name"
else else
echo "Key $key not found in $docker_compose_file" echo "Key $key not found in $docker_compose_file"
fi fi
done done
# 在循环完毕后执行版本移动操作
if [[ -n "$cleaned_version" ]]; then if [[ -n "$cleaned_version" ]]; then
mv apps/$app_name/$old_version apps/$app_name/$cleaned_version mv apps/$app_name/$old_version apps/$app_name/$cleaned_version
echo "Moved $old_version to $cleaned_version" echo "Moved apps/$app_name/$old_version to apps/$app_name/$cleaned_version"
else else
echo "Could not determine version for image: $image" echo "Could not determine version for image: $image"
fi fi
@ -122,13 +118,11 @@ do
image=$(yq .services.$first_service.image $docker_compose_file) image=$(yq .services.$first_service.image $docker_compose_file)
echo "Found image: $image" echo "Found image: $image"
# 进行后续处理
process_image "$image" "$app_name" process_image "$image" "$app_name"
# 在处理第一个服务后执行版本移动操作
if [[ -n "$cleaned_version" ]]; then if [[ -n "$cleaned_version" ]]; then
mv apps/$app_name/$old_version apps/$app_name/$cleaned_version mv apps/$app_name/$old_version apps/$app_name/$cleaned_version
echo "Moved $old_version to $cleaned_version" echo "Moved apps/$app_name/$old_version to apps/$app_name/$cleaned_version"
else else
echo "Could not determine version for image: $image" echo "Could not determine version for image: $image"
fi fi

View File

@ -6,7 +6,7 @@ name: immich-machine-learning
services: services:
immich-machine-learning: immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:v1.122.3 image: ghcr.io/immich-app/immich-machine-learning:v1.122.2
container_name: immich-machine-learning-${CONTAINER_NAME} container_name: immich-machine-learning-${CONTAINER_NAME}
labels: labels:
createdBy: "Apps" createdBy: "Apps"

View File

@ -47,7 +47,7 @@ services:
immich-server: immich-server:
depends_on: depends_on:
- immich-pg14-vectors - immich-pg14-vectors
image: ghcr.io/immich-app/immich-server:v1.122.3 image: ghcr.io/immich-app/immich-server:v1.122.2
container_name: immich-server-${CONTAINER_NAME} container_name: immich-server-${CONTAINER_NAME}
labels: labels:
createdBy: "Apps" createdBy: "Apps"

View File

@ -6,7 +6,7 @@ name: immich-server
services: services:
immich-server: immich-server:
image: ghcr.io/immich-app/immich-server:v1.122.3 image: ghcr.io/immich-app/immich-server:v1.122.2
container_name: immich-server-${CONTAINER_NAME} container_name: immich-server-${CONTAINER_NAME}
labels: labels:
createdBy: "Apps" createdBy: "Apps"

View File

@ -47,7 +47,7 @@ services:
immich-server: immich-server:
depends_on: depends_on:
- immich-pg14-vectors - immich-pg14-vectors
image: ghcr.io/immich-app/immich-server:v1.122.3 image: ghcr.io/immich-app/immich-server:v1.122.2
container_name: immich-server-${CONTAINER_NAME} container_name: immich-server-${CONTAINER_NAME}
labels: labels:
createdBy: "Apps" createdBy: "Apps"
@ -75,7 +75,7 @@ services:
disable: false disable: false
immich-machine-learning: immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:v1.122.3 image: ghcr.io/immich-app/immich-machine-learning:v1.122.2
container_name: immich-machine-learning-${CONTAINER_NAME} container_name: immich-machine-learning-${CONTAINER_NAME}
labels: labels:
createdBy: "Apps" createdBy: "Apps"