diff options
author | EuAndreh <eu@euandre.org> | 2019-06-11 18:36:03 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-11 18:36:27 -0300 |
commit | ec2142d339ab1f35009d9205f6d670dbb26f079b (patch) | |
tree | 20ec5da3a1709e305c344534f949a435123f6d22 /scripts | |
parent | Don't fail when =terraform apply= is a noop (diff) | |
download | server-ec2142d339ab1f35009d9205f6d670dbb26f079b.tar.gz server-ec2142d339ab1f35009d9205f6d670dbb26f079b.tar.xz |
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.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/deploy.sh | 3 |
1 files changed, 3 insertions, 0 deletions
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 |