aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci/mail.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-10 18:54:40 -0300
committerEuAndreh <eu@euandre.org>2019-06-10 18:54:40 -0300
commit053f8c46360c8f588817da1592cbf19135fdd0cf (patch)
tree6f50d06ceefe1aa91030bbec153492c14329e47f /scripts/ci/mail.sh
parentIgnore /logs.txt (diff)
downloadtoph-053f8c46360c8f588817da1592cbf19135fdd0cf.tar.gz
toph-053f8c46360c8f588817da1592cbf19135fdd0cf.tar.xz
Only send log email when running on CI
Diffstat (limited to 'scripts/ci/mail.sh')
-rwxr-xr-xscripts/ci/mail.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/ci/mail.sh b/scripts/ci/mail.sh
index 2796606..7058233 100755
--- a/scripts/ci/mail.sh
+++ b/scripts/ci/mail.sh
@@ -37,6 +37,13 @@ EOF
)
tail -n +1 ./logs/*.txt > "${ATTACHMENT_PATH}"
+
+[[ "${USER}" = "build" ]] || {
+ echo "Not running on CI."
+ echo "Early exit on sending email logs."
+ exit
+}
+
gpg --always-trust \
-r "${GPG_TO}" \
-e "${ATTACHMENT_PATH}"