Skip to content

Commit 4c74f16

Browse files
Merge pull request #50846 from gaurav-nelson/fix-vale-check
Run different commands when running on travis and locally
2 parents 63b387a + 87c6358 commit 4c74f16

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

scripts/check-with-vale.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ if [ -n "${FILES}" ] ;
1212
echo "==============================================================================================================================="
1313
echo "Read about the error terms that cause the build to fail at https://redhat-documentation.github.io/vale-at-red-hat/docs/reference-guide/termserrors/"
1414
echo "==============================================================================================================================="
15-
echo ""
16-
vale ${FILES} --glob='*.adoc'
17-
echo ""
1815
if [ "$TRAVIS" = true ] ; then
19-
set -x
2016
#clean out conditional markup in Travis CI
2117
sed -i -e 's/ifdef::.*\|ifndef::.*\|ifeval::.*\|endif::.*/ /' ${FILES}
18+
echo ""
19+
vale ${FILES} --glob='*.adoc' --no-exit
20+
echo ""
21+
set -x
2222
#run vale again, and this time send to pipedream
2323
PR_DATA=''
2424
if [ "$1" == false ] ; then
@@ -35,6 +35,10 @@ if [ -n "${FILES}" ] ;
3535
else
3636
curl -H "Content-Type: text/json" --data "@vale_errors.json" https://eox4isrzuh8pnai.m.pipedream.net
3737
fi
38+
else
39+
echo ""
40+
vale ${FILES} --glob='*.adoc'
41+
echo ""
3842
fi
3943
else
4044
echo "No asciidoc files added or modified."

0 commit comments

Comments
 (0)