File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,15 @@ jobs:
4242
4343 - name : Check if commit contains files that should be ignored
4444 run : |
45- git clone --depth 1 https://github.com/github/gitignore.git &&
46- cat gitignore/Node.gitignore $(find gitignore/Global -name "*.gitignore" | grep -v ModelSim) > all.gitignore &&
47- if [[ "$(git ls-files -iX all.gitignore)" != "" ]]; then
48- echo "::error::Please remove these files:"
49- git ls-files -iX all.gitignore
45+ git clone --depth 1 https://github.com/github/gitignore.git
46+
47+ rm gitignore/Global/ModelSim.gitignore
48+ rm gitignore/Global/Images.gitignore
49+ cat gitignore/Node.gitignore gitignore/Global/*.gitignore > all.gitignore
50+
51+ IGNORED_FILES=$(git ls-files --cached --ignored --exclude-from=all.gitignore)
52+ if [[ "$IGNORED_FILES" != "" ]]; then
53+ echo -e "::error::Please remove these files:\n$IGNORED_FILES" | sed -z 's/\n/%0A/g'
5054 exit 1
5155 fi
5256
You can’t perform that action at this time.
0 commit comments