aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-11 18:36:03 -0300
committerEuAndreh <eu@euandre.org>2019-06-11 18:36:27 -0300
commitec2142d339ab1f35009d9205f6d670dbb26f079b (patch)
tree20ec5da3a1709e305c344534f949a435123f6d22
parentDon't fail when =terraform apply= is a noop (diff)
downloadserver-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.
-rwxr-xr-xscripts/ci/deploy.sh3
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