jsonnet-bundler/scripts/check_license.sh

11 lines
280 B
Bash
Raw Normal View History

2018-04-24 15:19:40 +01:00
#!/bin/sh
licRes=$(
for file in $(find . -type f -iname '*.go' ! -path '*/vendor/*'); do
head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)" || echo -e " ${file}"
done;)
if [ -n "${licRes}" ]; then
echo -e "license header checking failed:\n${licRes}"
exit 255
fi