@@ -17,18 +17,20 @@ if [ -n "${FILES}" ] ;
1717 sed -i -e ' s/ifdef::.*\|ifndef::.*\|ifeval::.*\|endif::.*/ /' ${FILES}
1818 vale ${FILES} --minAlertLevel=error --glob=' *.adoc' --no-exit
1919 echo " "
20- set -x
21- # run again, and this time send to pipedream
22- PR_DATA=' '
23- if [ " $1 " == false ] ; then
24- PR_DATA=' {"PR": [{"Number": "None", "SHA": "None"}],'
25- else
26- PR_DATA=' {"PR": [{"Number": "' " $1 " ' ", "SHA": "' " $2 " ' "}]' ,
20+ if [ " $TRAVIS " = true ] ; then
21+ set -x
22+ # run vale again, and this time send to pipedream
23+ PR_DATA=' '
24+ if [ " $1 " == false ] ; then
25+ PR_DATA=' {"PR": [{"Number": "None", "SHA": "None"}],'
26+ else
27+ PR_DATA=' {"PR": [{"Number": "' " $1 " ' ", "SHA": "' " $2 " ' "}]' ,
28+ fi
29+ echo " ${PR_DATA} " > vale_errors.json
30+ ERROR_DATA=$( vale ${FILES} --minAlertLevel=error --glob=' *.adoc' --output=JSON --no-exit)
31+ echo " ${ERROR_DATA: 1} " >> vale_errors.json
32+ curl -H " Content-Type: text/json" --data " @vale_errors.json" https://eox4isrzuh8pnai.m.pipedream.net
2733 fi
28- echo " ${PR_DATA} " > vale_errors.json
29- ERROR_DATA=$( vale ${FILES} --minAlertLevel=error --glob=' *.adoc' --output=JSON --no-exit)
30- echo " ${ERROR_DATA: 1} " >> vale_errors.json
31- curl -H " Content-Type: text/json" --data " @vale_errors.json" https://eox4isrzuh8pnai.m.pipedream.net
3234 else
3335 echo " No asciidoc files added or modified."
3436fi
0 commit comments