diff --git a/docker/apphub/Dockerfile b/docker/apphub/Dockerfile index f1d6fbb2..24d6c46a 100644 --- a/docker/apphub/Dockerfile +++ b/docker/apphub/Dockerfile @@ -1,6 +1,6 @@ # This file can running at actions # MEDIA_VERSION and LIBRARY_VERSION will trigger its release -# modify time: 202410151112, you can modify here to trigger Docker Build action +# modify time: 202410151150, you can modify here to trigger Docker Build action FROM python:3.10-slim-bullseye diff --git a/docker/apphub/script/entrypoint.sh b/docker/apphub/script/entrypoint.sh index 4b0525fa..76329e6b 100644 --- a/docker/apphub/script/entrypoint.sh +++ b/docker/apphub/script/entrypoint.sh @@ -26,7 +26,7 @@ for ((i=0; i<$try_times; i++)); do done if [[ -n "$username" ]]; then - echo "git config --global user.name $username" + echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - git config --global user.name $username" git config --global user.name "$username" else echo "username is null, git config username failed" @@ -35,7 +35,7 @@ fi regex="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" if [[ $email =~ $regex ]]; then - echo "git config --global user.email $email" + echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - git config --global user.email $email" git config --global user.email "$email" else echo "Not have correct email, git config email failed" diff --git a/docker/apphub/script/migration.sh b/docker/apphub/script/migration.sh index 790e90a6..d5785173 100644 --- a/docker/apphub/script/migration.sh +++ b/docker/apphub/script/migration.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo "start to migrate config.ini" +echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - start to migrate config.ini" migrate_ini() { @@ -46,7 +46,7 @@ migrate_ini "/websoft9/apphub/src/config/config.ini" "/websoft9/config/config.in migrate_ini "/websoft9/apphub/src/config/system.ini" "/websoft9/config/system.ini" if [ $? -eq 0 ]; then - echo "Success to update config.ini" + echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Success to update config.ini" else - echo "Fail to update config.ini, skip it" + echo "$(date '+%Y-%m-%d %H:%M:%S') - ERROR - Fail to update config.ini, skip it" fi \ No newline at end of file diff --git a/docker/apphub/script/update.sh b/docker/apphub/script/update.sh index f96ea2f5..7ef46d23 100644 --- a/docker/apphub/script/update.sh +++ b/docker/apphub/script/update.sh @@ -1,9 +1,9 @@ #!/bin/bash -echo "$(date) - Compare remote version and local version." | tee -a /var/log/supervisord.log +echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - 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 +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" -echo "$(date) - Success to update library and media." \ No newline at end of file +echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Success to update library and media." \ No newline at end of file