diff --git a/run.sh b/run.sh index df7cdb0..2a5f1c0 100755 --- a/run.sh +++ b/run.sh @@ -99,6 +99,11 @@ cd /app/ yarn start & while true; do + UPDATE_OPTS="" + if [[ "true" == "${ONLY_NEW_REQUESTS:-true}" ]] && [[ ! -f "${DEPLOYMENTS_DIR}/autodeploy.state" ]]; then + UPDATE_OPTS="--only-update-state" + fi + echo "==============================================================" echo "########### UNDEPLOY ############" @@ -111,6 +116,7 @@ while true; do --include-tags "$INCLUDE_TAGS" \ --exclude-tags "$EXCLUDE_TAGS" \ $EXTRA_UNDEPLOY_OPTS \ + $UPDATE_OPTS \ --discover echo "############ DEPLOY #############" @@ -127,6 +133,7 @@ while true; do --exclude-tags "$EXCLUDE_TAGS" \ $LOG_OPTS \ $EXTRA_DEPLOY_OPTS \ + $UPDATE_OPTS \ --discover # Cleanup any build leftovers