Add debug to preview script, fix typo
@@ -4,7 +4,7 @@ set -e +o pipefail
url="https://preview.nrelabs.io/webhook"
-ech "ENV TO FOLLOW"
+echo "ENV TO FOLLOW"
echo $(env)
# # https://docs.travis-ci.com/user/environment-variables/
@@ -58,16 +58,19 @@ then
exit 0
fi
-echo "Requesting preview...."
-
-curl $url --header "Content-Type: application/json" \
- --data "{
+PREVIEW_PAYLOAD = "{
\"branch\":\"$GITHUB_HEAD_REF\",
\"pullRequest\":\"$PR_ID\",
\"repoSlug\":\"$GITHUB_REPOSITORY\",
\"prSha\":\"$GITHUB_SHA\"
}"
+echo "Requesting preview...."
+echo $PREVIEW_PAYLOAD
+
+curl $url --header "Content-Type: application/json" \
+ --data $PREVIEW_PAYLOAD
+
echo "DONE!"
