mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 14:30:12 +01:00
chore(check): Add license-check for .go , .sh , Dockerfile and Makefile (#205)
Signed-off-by: ajeetrai707 <ajeetrai707@gmail.com>
This commit is contained in:
parent
e40026c98a
commit
27fe7e3b06
10 changed files with 115 additions and 2 deletions
15
Makefile
15
Makefile
|
|
@ -93,7 +93,7 @@ export DBUILD_ARGS=--build-arg DBUILD_DATE=${DBUILD_DATE} --build-arg DBUILD_REP
|
|||
CSI_DRIVER=zfs-driver
|
||||
|
||||
.PHONY: all
|
||||
all: test manifests zfs-driver-image
|
||||
all: license-check test manifests zfs-driver-image
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
|
@ -246,3 +246,16 @@ golint:
|
|||
@echo "Completed golint no recommendations !!"
|
||||
@echo "--------------------------------"
|
||||
@echo ""
|
||||
|
||||
.PHONY: license-check
|
||||
license-check:
|
||||
@echo "--> Checking license header..."
|
||||
@licRes=$$(for file in $$(find . -type f -regex '.*\.sh\|.*\.go\|.*Docker.*\|.*\Makefile*' ! -path './vendor/*' ) ; do \
|
||||
awk 'NR<=5' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \
|
||||
done); \
|
||||
if [ -n "$${licRes}" ]; then \
|
||||
echo "license header checking failed:"; echo "$${licRes}"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo "--> Done checking license."
|
||||
@echo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue