Fix the logic to check if the email auth token is present.
While at it, make output more verbose for easier debug.
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
(cherry picked from commit
b9f7f8928ab26f15f0950d00a7f2417ffa204755)
Change-Id: Iceb00e5617cbfb787353c7caf05e5d00e9512d70
# ask for email report
-if [ -z "$KCI_EMAIL_AUTH_TOKEN" ]; then
+set -x
+if [ -n "$KCI_EMAIL_AUTH_TOKEN" ]; then
KCI_API='https://kernelci.dev.baylibre.com:8081'
TREE_NAME=$(grep kernel.tree: $JOB_FILE_NEW | sed 's,[[:space:]],,g' | cut -d: -f2)
BRANCH=$(grep git.branch: $JOB_FILE_NEW | sed 's,[[:space:]],,g' | cut -d: -f2)
fi
set -e
fi
+set +x
+
# after one successful submit, we're done
if [ x"$status" = x"Complete" ]; then
exit 0