mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 07:23:02 +00:00
1c8262be12
Also adds a `check_license` target to the Makefile to run the script
11 lines
280 B
Bash
Executable File
11 lines
280 B
Bash
Executable File
#!/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
|