diff --git a/Makefile b/Makefile index 96c84855..df647ef0 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,13 @@ check: @yarn install --prefer-offline -@./bin/setup +.PHONE: licence +licence: + ./node_modules/.bin/license-to-fail ./licence.js + make licence-check + SUBDIRS := $(dir $(wildcard */Makefile)) -TARGETS := install clean test test-ci lint lint-ci # whatever else, but must not contain '/' +TARGETS := install clean test test-ci lint lint-ci licence-check# whatever else, but must not contain '/' # foo/.all bar/.all foo/.clean bar/.clean SUBDIRS_TARGETS := \ diff --git a/cloudapi-graphql/Makefile b/cloudapi-graphql/Makefile index 8bdaf473..f4312ebe 100644 --- a/cloudapi-graphql/Makefile +++ b/cloudapi-graphql/Makefile @@ -48,3 +48,7 @@ lint: lint-ci: mkdir -p $(XUNIT_DIR) -$(bindir)/eslint . --format tap | $(XUNIT) $(XUNIT_OUTPUT)-lint.xml + +.PHONY: licence-check +licence-check: + ../node_modules/.bin/license-to-fail ../licence.js diff --git a/frontend/Makefile b/frontend/Makefile index 97eab1ff..bf505633 100644 --- a/frontend/Makefile +++ b/frontend/Makefile @@ -63,3 +63,7 @@ lint: lint-ci: mkdir -p $(XUNIT_DIR) -$(bindir)/eslint . --format tap | $(XUNIT) $(XUNIT_OUTPUT)-lint.xml + +.PHONY: licence-check +licence-check: + ../node_modules/.bin/license-to-fail ../licence.js diff --git a/nginx/Makefile b/nginx/Makefile index 6505b6ea..59869a1a 100644 --- a/nginx/Makefile +++ b/nginx/Makefile @@ -31,3 +31,6 @@ lint: .PHONY: lint-ci lint-ci: + +.PHONY: licence-check +lint-ci: diff --git a/package.json b/package.json index 40f62fd9..538e8eaf 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "prepush": "make test" }, "dependencies": { - "husky": "^0.11.9" + "husky": "^0.11.9", + "license-to-fail": "^2.2.0" }, "devDependencies": { "tap-xunit": "^1.4.0" diff --git a/ui/Makefile b/ui/Makefile index 49427d20..4c6e60a9 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -69,3 +69,7 @@ lint-ci: .PHONY: publish publish: docker build --build-arg NPM_TOKEN=${NPM_TOKEN} --build-arg CIRCLE_BUILD_NUM=${CIRCLE_BUILD_NUM} -f Dockerfile.build . + +.PHONY: licence-check +licence-check: + ../node_modules/.bin/license-to-fail ../licence.js