fix(validate-license): update to work with newer versions of coreutils

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
pull/6577/head
Matthew Fisher 6 years ago
parent caff38ffa1
commit 935ee90d9f
No known key found for this signature in database
GPG Key ID: 92AA783CBAAE8E3B

@ -27,7 +27,7 @@ find_files() {
\( -name '*.go' -o -name '*.sh' -o -name 'Dockerfile' \) \( -name '*.go' -o -name '*.sh' -o -name 'Dockerfile' \)
} }
failed_license_header=($(find_files | xargs grep -L 'Licensed under the Apache License, Version 2.0 (the "License");')) failed_license_header=($(grep -L 'Licensed under the Apache License, Version 2.0 (the "License");' $(find_files))) || :
if (( ${#failed_license_header[@]} > 0 )); then if (( ${#failed_license_header[@]} > 0 )); then
echo "Some source files are missing license headers." echo "Some source files are missing license headers."
for f in "${failed_license_header[@]}"; do for f in "${failed_license_header[@]}"; do
@ -36,7 +36,7 @@ if (( ${#failed_license_header[@]} > 0 )); then
exit 1 exit 1
fi fi
failed_copyright_header=($(find_files | xargs grep -L 'Copyright The Helm Authors.')) failed_copyright_header=($(grep -L 'Copyright The Helm Authors.' $(find_files))) || :
if (( ${#failed_copyright_header[@]} > 0 )); then if (( ${#failed_copyright_header[@]} > 0 )); then
echo "Some source files are missing the copyright header." echo "Some source files are missing the copyright header."
for f in "${failed_copyright_header[@]}"; do for f in "${failed_copyright_header[@]}"; do

Loading…
Cancel
Save