Merge "Added copyright in Makefile"
This commit is contained in:
commit
3fefc40632
11
Makefile
11
Makefile
@ -82,6 +82,7 @@ install-npm-modules: $(NPX)
|
||||
cd $(WEBDIR) && (PATH="$(PATH):$(JSLINTER_BIN)"; $(NPM) install) && cd ..
|
||||
|
||||
.PHONY: test
|
||||
test: check-copyright
|
||||
test:
|
||||
go test $(RECURSIVE_DIRS) -v $(TESTFLAGS)
|
||||
|
||||
@ -170,3 +171,13 @@ $(LINTER):
|
||||
$(NPX):
|
||||
@mkdir -p $(TOOLBINDIR)
|
||||
./tools/install_js_linter
|
||||
|
||||
# add-copyright is a utility to add copyright header to missing files
|
||||
.PHONY: add-copyright
|
||||
add-copyright:
|
||||
@./tools/add_license.sh
|
||||
|
||||
# check-copyright is a utility to check if copyright header is present on all files
|
||||
.PHONY: check-copyright
|
||||
check-copyright:
|
||||
@./tools/check_copyright
|
@ -19,7 +19,8 @@ add_license() {
|
||||
ext=$1
|
||||
template=$2
|
||||
# skipping license for testdata and manifests folders
|
||||
FILES=$(find -L . -name "*.${ext}" | grep -v "testdata" | grep -v "manifests")
|
||||
# also skipping license for node and node_modules
|
||||
FILES=$(find -L . -name "*.${ext}" | grep -v "testdata" | grep -v "manifests" | grep -v "tools/*node*" | grep -v "web/node_modules")
|
||||
|
||||
for each in $FILES
|
||||
do
|
||||
|
@ -18,7 +18,8 @@ declare FILES_MISSING_COPYRIGHT=()
|
||||
check_license() {
|
||||
ext=$1
|
||||
# skipping license for testdata and manifests folders
|
||||
FILES=$(find -L . -name "*.${ext}" | grep -v "testdata" | grep -v "manifests")
|
||||
# also skipping licence for node and node_modules
|
||||
FILES=$(find -L . -name "*.${ext}" | grep -v "testdata" | grep -v "manifests" | grep -v "tools/*node*" | grep -v "web/node_modules")
|
||||
|
||||
for each in $FILES
|
||||
do
|
||||
|
Loading…
x
Reference in New Issue
Block a user