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:
42
42
43
43
- name : Check if commit contains files that should be ignored
44
44
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'
50
54
exit 1
51
55
fi
52
56
You can’t perform that action at this time.
0 commit comments