File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 39
39
40
40
paths_with_missing_license=( )
41
41
42
+ static_exclude_list=( )
43
+ static_exclude_list+=( ' ":(exclude).license_header_template"' )
44
+ static_exclude_list+=( ' ":(exclude).swift-version"' ) # Swift version files do not have comments nor licenses in them
45
+ dynamic_exclude_list=( )
46
+
42
47
if [[ -f .licenseignore ]]; then
43
- static_exclude_list=' ":(exclude).licenseignore" ":(exclude).license_header_template" '
44
- dynamic_exclude_list=$( tr ' \n' ' \0' < .licenseignore | xargs -0 -I% printf ' ":(exclude)%" ' )
45
- exclude_list=$static_exclude_list$dynamic_exclude_list
46
- else
47
- exclude_list=" :(exclude).license_header_template"
48
+ static_exclude_list+=( ' ":(exclude).licenseignore"' )
49
+ IFS=$' \n ' read -d ' ' -r -a dynamic_exclude_list <<< " $(sed -E 's/^(.*)$/" :(exclude)\1 " /' <.licenseignore)"
48
50
fi
49
51
50
- file_paths=$( echo " $exclude_list " | xargs git ls-files)
52
+ exclude_list=( " ${static_exclude_list[@]} " " ${dynamic_exclude_list[@]} " )
53
+ excludes=$( IFS=" " ; echo " ${exclude_list[*]} " )
54
+
55
+ file_paths=$( echo " $excludes " | xargs git ls-files)
51
56
52
57
while IFS= read -r file_path; do
53
58
file_basename=$( basename -- " ${file_path} " )
You can’t perform that action at this time.
0 commit comments