From ec2142d339ab1f35009d9205f6d670dbb26f079b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 11 Jun 2019 18:36:03 -0300 Subject: deploy.sh: assert dir before running finish-phase Avoid failures that happened between a pushd and a popd to fail to call ./scripts/ci/mail.sh. --- scripts/ci/deploy.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/ci/deploy.sh') diff --git a/scripts/ci/deploy.sh b/scripts/ci/deploy.sh index f742b38..d3b9dac 100755 --- a/scripts/ci/deploy.sh +++ b/scripts/ci/deploy.sh @@ -4,10 +4,13 @@ set -Eeuo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" cd ../../ +PROJECT_ROOT="${PWD}" finish-phase() { local -r exit_code="${?}" + cd "${PROJECT_ROOT}" + if [[ "${exit_code}" = 0 ]]; then echo "Finished successfully." else -- cgit v1.2.3