Skip to content

Commit 3fdf83c

Browse files
committed
[MERGE #5937 @wyrichte] Added check_ascii.sh
Merge pull request #5937 from wyrichte:user/wyrichte/release/1.11
2 parents 0f7e500 + 7816861 commit 3fdf83c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

jenkins/check_ascii.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#-------------------------------------------------------------------------------------------------------
2+
# Copyright (C) Microsoft. All rights reserved.
3+
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+
#-------------------------------------------------------------------------------------------------------
5+
6+
# Need to make sure that the reference to origin/master is available.
7+
# We know that HEAD is checked out so that the tests on that source can be run.
8+
9+
# configure the sh environment to run scripts from the bin dir in case that's missing
10+
ls &> /dev/null # checking for ls script on the path
11+
if [ $? -ne 0 ]; then
12+
PATH=/bin:/usr/bin:$PATH
13+
fi
14+
15+
ERRFILE=check_ascii.sh.err
16+
rm -f $ERRFILE
17+
git diff --name-only `git merge-base origin/master HEAD` HEAD | grep -v -E "test/.*|tools/.*|Build/.*|/*.md|/*.txt|/*.vcxproj" | xargs -I % ./jenkins/check_file_ascii.sh %
18+
19+
if [ -e $ERRFILE ]; then # if error file exists then there were errors
20+
>&2 echo "--------------" # leading >&2 means echo to stderr
21+
>&2 echo "--- ERRORS ---"
22+
cat $ERRFILE 1>&2 # send output to stderr so it can be redirected as error if desired
23+
exit 1 # tell the caller there was an error (so Jenkins will fail the CI task)
24+
else
25+
echo "--- NO PROBLEMS DETECTED ---"
26+
fi

0 commit comments

Comments
 (0)