Переглянути джерело

HUE-9043 [ci] Skips files that are deleted, binary in ASCII check

Romain 6 роки тому
батько
коміт
13cea769b0
1 змінених файлів з 3 додано та 2 видалено
  1. 3 2
      tools/ci/check_non_ascii_characters.sh

+ 3 - 2
tools/ci/check_non_ascii_characters.sh

@@ -15,12 +15,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# Skips files that are: deleted, binary.
 
 FOUND_ISSUE=0
 
-for f in `git diff --name-only origin/master`
+for f in `git diff --name-only origin/master --diff-filter=b`
 do
- grep --color='auto' -P -n "[^\x00-\x7F]" $f
+ grep --color='auto' -P -n "[^\x00-\x7F]" --binary-files=without-match $f
  if [ "$?" -eq "0" ]
   then
     echo "Non ASCII characters found in $f"