Skip to content

Commit 85e54b8

Browse files
authored
Merge pull request #37 from sebsto/sst-custom-license-header
Silently ignore .licenseignore and .license_header_template
2 parents bd0abce + d114586 commit 85e54b8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/scripts/check-license-header.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ fi
4040

4141
paths_with_missing_license=( )
4242

43-
file_paths=$(tr '\n' '\0' < .licenseignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files)
43+
file_excludes=".license_header_template
44+
.licenseignore"
45+
if [ -f .licenseignore ]; then
46+
file_excludes=$file_excludes$(printf '\n')$(cat .licenseignore)
47+
fi
48+
file_paths=$(echo "$file_excludes" | tr '\n' '\0' | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files)
4449

4550
while IFS= read -r file_path; do
4651
file_basename=$(basename -- "${file_path}")

0 commit comments

Comments
 (0)