Skip to content

Commit

Permalink
Enable trace filtering everywhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Dec 15, 2011
1 parent 280a63d commit b680177
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions shell/functions
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,19 @@ hook()

hook_source()
{
trace_filter "deploy" || set -o xtrace
( set -v ; source "$1" )
}

before_step()
{
trace_filter "deploy" || set -o xtrace
hook "before_$1" "$@"
}

after_step()
{
trace_filter "deploy" || set -o xtrace
hook "after_$1" "$@"
}

Expand Down Expand Up @@ -263,6 +266,7 @@ configure()
record()
{ # TODO: What else could we record that would be useful?
trace_filter "deploy" || set -o xtrace

paths exist "${release_path}" || return 0 # Release failed, nothing to do...

if variable is nonempty revision
Expand Down Expand Up @@ -361,6 +365,8 @@ do_deploy()

deploy()
{
trace_filter "deploy" || set -o xtrace

typeset _step
for _step in "${deploy_steps[@]}"
do
Expand All @@ -370,6 +376,8 @@ deploy()

revert_on_error()
{
trace_filter "deploy" || set -o xtrace

result=$?
trap "backtrace \"An errorr occured while reverting.\"" ERR
trap "backtrace \"An errorr occured while reverting.\"" ZERR
Expand All @@ -386,6 +394,8 @@ revert()

do_revert()
{
trace_filter "deploy" || set -o xtrace

log " Reverting ..."
retreat "deploy" "${deploy_steps[@]}"
}
Expand Down
2 changes: 2 additions & 0 deletions shell/initialize
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

trace_filter "deploy" || set -o xtrace

typeset -gx shared_path project_path stage_path release_path discard_path \
versions_path log_file

Expand Down

0 comments on commit b680177

Please sign in to comment.