зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1813677 - unify the error reporting function across fast-forward scripts. r=dbaker DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D168297
This commit is contained in:
Родитель
8b2a7a80c7
Коммит
26f9300846
|
@ -1,7 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
function show_error_msg()
|
||||
{
|
||||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'echo "*** ERROR *** $? $LINENO $0 did not complete successfully!"' ERR
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
||||
# All commands should be printed as they are executed
|
||||
# set -x
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
function show_error_msg()
|
||||
{
|
||||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
|
|
@ -32,6 +32,7 @@ function show_error_msg()
|
|||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
@ -51,7 +52,6 @@ be as simple as running the following commands:
|
|||
hg commit --amend -l $TMP_DIR/commit_message.txt
|
||||
bash $0
|
||||
"
|
||||
ERROR_HELP=""
|
||||
COMMIT_LIST_FILE=$TMP_DIR/rebase-commit-list.txt
|
||||
export HGPLAIN=1
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ function show_error_msg()
|
|||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
@ -37,7 +38,6 @@ if [ "x$HANDLE_NOOP_COMMIT" = "x" ]; then
|
|||
HANDLE_NOOP_COMMIT=""
|
||||
fi
|
||||
|
||||
ERROR_HELP=""
|
||||
RESUME=""
|
||||
if [ -f $STATE_DIR/resume_state ]; then
|
||||
RESUME=`tail -1 $STATE_DIR/resume_state`
|
||||
|
|
|
@ -15,6 +15,7 @@ function show_error_msg()
|
|||
echo_log "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo_log "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
@ -50,7 +51,6 @@ fi
|
|||
|
||||
MOZ_CHANGED=0
|
||||
GIT_CHANGED=0
|
||||
ERROR_HELP=""
|
||||
HANDLE_NOOP_COMMIT=""
|
||||
|
||||
# After this point:
|
||||
|
|
|
@ -23,7 +23,9 @@
|
|||
function show_error_msg()
|
||||
{
|
||||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
|
|
@ -5,6 +5,7 @@ function show_error_msg()
|
|||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
@ -16,8 +17,6 @@ echo "MOZ_LIBWEBRTC_BRANCH: $MOZ_LIBWEBRTC_BRANCH"
|
|||
echo "MOZ_FASTFORWARD_BUG: $MOZ_FASTFORWARD_BUG"
|
||||
echo "MOZ_PRIOR_LIBWEBRTC_BRANCH: $MOZ_PRIOR_LIBWEBRTC_BRANCH"
|
||||
|
||||
ERROR_HELP=""
|
||||
|
||||
# After this point:
|
||||
# * eE: All commands should succeed.
|
||||
# * u: All variables should be defined before use.
|
||||
|
|
|
@ -12,14 +12,13 @@ function show_error_msg()
|
|||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
||||
source dom/media/webrtc/third_party_build/use_config_env.sh
|
||||
|
||||
ERROR_HELP=""
|
||||
|
||||
# After this point:
|
||||
# * eE: All commands should succeed.
|
||||
# * o pipefail: All stages of all pipes should succeed.
|
||||
|
|
|
@ -5,6 +5,7 @@ function show_error_msg()
|
|||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
function show_error_msg()
|
||||
{
|
||||
echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
|
||||
echo "$ERROR_HELP"
|
||||
}
|
||||
ERROR_HELP=""
|
||||
|
||||
# Print an Error message if `set -eE` causes the script to exit due to a failed command
|
||||
trap 'echo "*** ERROR *** $? $LINENO $0 did not complete successfully!"' ERR
|
||||
trap 'show_error_msg $LINENO' ERR
|
||||
|
||||
source dom/media/webrtc/third_party_build/use_config_env.sh
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче