apphub 0.1.8

This commit is contained in:
qiaofeng1227 2024-12-23 15:05:39 +08:00
parent 9590abd6ec
commit 61c80261de
2 changed files with 17 additions and 5 deletions

View File

@ -1,11 +1,11 @@
# This file can running at actions
# MEDIA_VERSION and LIBRARY_VERSION will trigger its release
# modify time: 202412211221, you can modify here to trigger Docker Build action
# modify time: 202412231521, you can modify here to trigger Docker Build action
FROM python:3.10-slim-bullseye
LABEL maintainer="Websoft9<help@websoft9.com>"
LABEL version="0.1.7"
LABEL version="0.1.8"
WORKDIR /websoft9
@ -39,6 +39,7 @@ RUN apt update && apt install -y --no-install-recommends curl git jq cron iprout
cp -r ./w9source/apphub/src/config ./config && \
cp -r ./w9source/docker/apphub/script ./script && \
curl -o ./script/update_zip.sh $SOURCE_GITHUB_PAGES/scripts/update_zip.sh && \
curl -o /websoft9/version.json $SOURCE_GITHUB_PAGES/version.json && \
pip install --no-cache-dir --upgrade -r apphub/requirements.txt && \
pip install -e ./apphub && \
# Clean cache and install files

View File

@ -1,9 +1,20 @@
#!/bin/bash
echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Compare remote version and local version." | tee -a /var/log/supervisord.log
channel=release
if [ -f /websoft9/version.json ]; then
version=$(cat /websoft9/version.json | jq -r .version)
if [[ $version == *rc* ]]; then
channel=dev
fi
fi
echo "channel is $channel"
echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Compare remote version and local version." | tee -a /var/log/supervisord.log
echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Download remote packages and replace local data." | tee -a /var/log/supervisord.log
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"
bash /websoft9/script/update_zip.sh --channel $channel --package_name "media-latest.zip" --sync_to "/websoft9/media"
bash /websoft9/script/update_zip.sh --channel $channel --package_name "library-latest.zip" --sync_to "/websoft9/library"
echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Success to update library and media."