File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 3939
4040paths_with_missing_license=( )
4141
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-
4742if [[ -f .licenseignore ]]; then
48- static_exclude_list+=( ' ":(exclude).licenseignore"' )
49- IFS=$' \n ' read -r -a dynamic_exclude_list <<< " $(sed -E 's/^(.*)$/" :(exclude)\1 " /' <.licenseignore)"
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"
5048fi
5149
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)
50+ file_paths=$( echo " $exclude_list " | xargs git ls-files)
5651
5752while IFS= read -r file_path; do
5853 file_basename=$( basename -- " ${file_path} " )
You can’t perform that action at this time.
0 commit comments