Skip to content

Fix bug in CMake function #4177

Fix bug in CMake function

Fix bug in CMake function #4177

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2019-2021 Xilinx, Inc. All rights reserved.
name: Check File Encoding
on:
pull_request:
jobs:
binary_check:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt update
sudo apt install jq curl
- name: Binary Check
run: |
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .raw_url')
for f in ${FILES[*]}; do
echo "checking $f ..."
#git submodule file is coming as null here, so skip further checks for this type of files
if [ $f == null ]; then
continue;
fi
if ! $(curl -s -L -I $f | grep "content-type:" | tail -1 | grep -q "text/"); then
echo "$f is not a text file"
exit 1
fi
done