From 73f99fa7ac930c905cc16d08336edd7dfdd7afcf Mon Sep 17 00:00:00 2001 From: Steven Briscoe Date: Mon, 9 Jan 2023 00:09:39 +0000 Subject: [PATCH] During app update, copy remaining app files before the app is started (#174) Co-authored-by: Steven Briscoe --- scripts/app | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/app b/scripts/app index e3195bfc..133bafb7 100755 --- a/scripts/app +++ b/scripts/app @@ -554,7 +554,7 @@ if [[ "$command" = "update" ]]; then copy_app_files "${UPDATE_FILES_WHITELIST_PRE}" - # Copy remaining files in the event of error or success + # Ensure remaining files are copied in case of unexpected exit trap "copy_app_files "${UPDATE_FILES_WHITELIST_POST}"; exit $?" INT TERM EXIT # Source env. after new exports.sh is copied (done above via 'copy_app_files') @@ -566,6 +566,9 @@ if [[ "$command" = "update" ]]; then echo "Pulling images for app ${app}..." compose "${app}" pull + # Copy remaining files to mark update as complete + copy_app_files "${UPDATE_FILES_WHITELIST_POST}" + if [[ "$*" != *"--skip-start"* ]]; then "${0}" "start" "${app}" # Remove any old images we don't need anymore