Skip to content

Commit

Permalink
build: add license check target to make
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Jun 28, 2022
1 parent f5799d0 commit 3ff118d
Show file tree
Hide file tree
Showing 4 changed files with 270 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .wwhrd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
allowlist:
- Apache-2.0
- BSD-3-Clause
- BSD-2-Clause
- BSD-2-Clause-Views
- MPL-2.0
- MIT
- ISC
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ $(BIN)/protoc-gen-go: PACKAGE=google.golang.org/protobuf/cmd/[email protected]
PIGEON = $(BIN)/pigeon
$(BIN)/pigeon: PACKAGE=github.com/mna/[email protected]

WWHRD = $(BIN)/wwhrd
$(BIN)/wwhrd: PACKAGE=github.com/frapposelli/wwhrd@latest

# Generated files

.DELETE_ON_ERROR:
Expand Down Expand Up @@ -147,6 +150,14 @@ fmt: .fmt-go~ .fmt-js~ ; $(info $(M) formatting code…) @ ## Format all source

# Misc

.PHONY: licensecheck
licensecheck: console/frontend/node_modules | $(WWHRD) ; $(info $(M) check dependency licenses…) @ ## Check licenses
$Q err=0 ; go mod vendor && $(WWHRD) --quiet check || err=$$? ; rm -rf vendor/ ; exit $$err
$Q cd console/frontend ; yarn run --silent license-compliance \
--production \
--allow "MIT;ISC;Apache-2.0;BSD-3-Clause;WTFPL;0BSD" \
--report detailed

.PHONY: clean
clean: ; $(info $(M) cleaning…) @ ## Cleanup everything
@rm -rf $(BIN) test $(GENERATED) *~
Expand Down
1 change: 1 addition & 0 deletions console/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"eslint": "^8.17.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-vue": "^9.1.1",
"license-compliance": "^1.2.3",
"postcss": "^8.4.14",
"prettier": "^2.7.0",
"prettier-plugin-tailwindcss": "^0.1.11",
Expand Down
Loading

0 comments on commit 3ff118d

Please sign in to comment.