File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments