Browse Source

chg: add ``--no-pre-deploy`` to inhibit running ``pre-deploy`` hooks.

Please note also that ``--no-hooks`` will now also inhibut
``pre-deploy`` hooks.

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cache-relation 1.5.12
Valentin Lab 3 years ago
parent
commit
f74cb3ced1
  1. 8
      bin/compose-core

8
bin/compose-core

@ -3633,6 +3633,7 @@ display_help() {
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 " --no-pre-deploy Do not run any pre-deploy script"
echo " --without-relation RELATION "
echo " Do not run given relation"
echo " -R, --rebuild-relations-to-service SERVICE"
@ -3933,6 +3934,9 @@ while read-0 arg; do
--no-post-deploy)
export no_post_deploy=true
;;
--no-pre-deploy)
export no_pre_deploy=true
;;
--rebuild-relations-to-service|-R)
read-0 value
rebuild_relations_to_service+=("$value")
@ -4197,7 +4201,9 @@ if [ -n "$full_init" ]; then
run_service_relations "${services_args[@]}" || exit 1
fi
run_service_hook pre_deploy "${services_args[@]}" || exit 1
if [[ -z "$no_pre_deploy" && -z "$no_hooks" ]]; then
run_service_hook pre_deploy "${services_args[@]}" || exit 1
fi
fi | log

Loading…
Cancel
Save