From b9dd681f88f150c9340fbd2c01815b1fef99e607 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sun, 25 Oct 2020 16:33:29 +0100 Subject: [PATCH] new: [compose-core] added ``--no-post-deploy`` and prevented also ``post-deploy`` from running when using ``--no-hooks`` Signed-off-by: Valentin Lab --- bin/compose-core | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/compose-core b/bin/compose-core index 1cc1440..2feb638 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -3604,8 +3604,9 @@ display_help() { echo " --dry-compose-run If docker-compose will be run, only print out what" echo " command line will be used." echo " --no-relations Do not run any relation script" - echo " --no-hooks Do not run any init script" + echo " --no-hooks Do not run any hook script" echo " --no-init Do not run any init script" + echo " --no-post-deploy Do not run any post-deploy script" echo " --without-relation RELATION " echo " Do not run given relation" echo " -R, --rebuild-relations-to-service SERVICE" @@ -3897,6 +3898,9 @@ while read-0 arg; do --no-init) export no_init=true ;; + --no-post-deploy) + export no_post_deploy=true + ;; --rebuild-relations-to-service|-R) read-0 value rebuild_relations_to_service+=("$value") @@ -4230,7 +4234,7 @@ case "$action" in esac || exit 1 -if [ "$post_hook" -a "${#services_args[@]}" != 0 ]; then +if [ "$post_hook" -a "${#services_args[@]}" != 0 -a -z "$no_hooks" -a -z "$no_post_deploy" ]; then run_service_hook post_deploy "${services_args[@]}" || exit 1 fi