Also adds a `check_license` target to the Makefile to run the scriptpull/1554/head
parent
322ad49b01
commit
1c8262be12
@ -0,0 +1,10 @@ |
||||
#!/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 |
||||
Loading…
Reference in new issue