From 6a31c259d4db330d1d5599cdab55f86717edf4ae Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Mon, 30 Oct 2023 16:55:03 +0800 Subject: [PATCH] rc --- docker/apphub/Dockerfile | 2 +- docker/apphub/script/update.sh | 4 ++-- scripts/update_zip.sh | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docker/apphub/Dockerfile b/docker/apphub/Dockerfile index b1e52ee7..11d939fa 100644 --- a/docker/apphub/Dockerfile +++ b/docker/apphub/Dockerfile @@ -1,4 +1,4 @@ -# modify time: 202310301631, you can modify here to trigger Docker Build action +# modify time: 202310301700, you can modify here to trigger Docker Build action FROM python:3.10-slim-bullseye LABEL maintainer="Websoft9" diff --git a/docker/apphub/script/update.sh b/docker/apphub/script/update.sh index 62994f91..f96ea2f5 100644 --- a/docker/apphub/script/update.sh +++ b/docker/apphub/script/update.sh @@ -3,7 +3,7 @@ echo "$(date) - Compare remote version and local version." | tee -a /var/log/supervisord.log echo "$(date) - Download remote packages and replace local data." | tee -a /var/log/supervisord.log -bash /websoft9/script/update_zip.sh --package_name "media.zip" --sync_to "/websoft9/media" -bash /websoft9/script/update_zip.sh --package_name "docker-library.zip" --sync_to "/websoft9/library" +bash /websoft9/script/update_zip.sh --package_name "media-latest.zip" --sync_to "/websoft9/media" +bash /websoft9/script/update_zip.sh --package_name "library-latest.zip" --sync_to "/websoft9/library" echo "$(date) - Success to update library and media." \ No newline at end of file diff --git a/scripts/update_zip.sh b/scripts/update_zip.sh index d468310c..82c4a65a 100644 --- a/scripts/update_zip.sh +++ b/scripts/update_zip.sh @@ -51,14 +51,10 @@ fi artifact_url="https://w9artifact.blob.core.windows.net/$channel/websoft9/plugin" upgrade_zip() { - # Check if the correct number of arguments were passed - if [ "$#" -ne 2 ]; then - echo "Usage: download_package " - return 1 - fi # Create the full URL by appending the package name to the artifact URL - local url="$artifact_url/$package_name" + local plugin_name=${package_name%%-*} + local url="$artifact_url/$plugin_name/$package_name" # Initialize download attempts local attempts=0