signing-preflight.sh: fix DRY_RUN mode
This script didn't work right with DRY_RUN=true. Fixes: * Don't "set -e" otherwise arithmetic evaluations cause the script to exit * Exit 0 on error when DRY_RUN is enabled Change-Id: I7d58ea0a2de1ed3e645f66b12c87798e07bfc00a Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
source $(dirname "$0")/lib/job_utils.sh
|
||||
source $(dirname "$0")/lib/job_utils.sh || exit 1
|
||||
|
||||
require_job_env BUILD_HOME
|
||||
|
||||
@@ -152,6 +151,6 @@ if [[ ${validation_errors} -eq 0 ]]; then
|
||||
exit 0
|
||||
else
|
||||
error "Found ${validation_errors} pre-flight check error(s)"
|
||||
exit 1
|
||||
$DRY_RUN && exit 0 || exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user