Skip to content

Commit c9b08d3

Browse files
Merge pull request #49790 from aireilly/vale-gitignore
adding .vale to gitignore
2 parents d315dbd + 53f29a9 commit c9b08d3

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ dev_guide/builds/images/chained-build.png.cache
1515
bin
1616
commercial_package
1717
.vscode
18+
.vale

scripts/check-with-vale.sh

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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."
3436
fi

0 commit comments

Comments
 (0)