Skip to content

Commit

Permalink
apphub 0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Dec 23, 2024
1 parent 9590abd commit 61c8026
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
5 changes: 3 additions & 2 deletions docker/apphub/Dockerfile
Original file line number Diff line number Diff line change
@@ -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<[email protected]>"
LABEL version="0.1.7"
LABEL version="0.1.8"

WORKDIR /websoft9

Expand Down Expand Up @@ -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
Expand Down
17 changes: 14 additions & 3 deletions docker/apphub/script/update.sh
Original file line number Diff line number Diff line change
@@ -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."

0 comments on commit 61c8026

Please sign in to comment.