-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9590abd
commit 61c8026
Showing
2 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |