Skip to content

Commit e148e3a

Browse files
authored
Remove Google license checker, we are using FOSSA on the repo (#1174)
* Remove Google license checker, we are using FOSSA ont he repo Signed-off-by: liamfallon <[email protected]> * Remove license checking from CI Signed-off-by: liamfallon <[email protected]> --------- Signed-off-by: liamfallon <[email protected]>
1 parent 9c5c256 commit e148e3a

File tree

11 files changed

+10
-122
lines changed

11 files changed

+10
-122
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ jobs:
5151
- name: Run unit tests
5252
run: |
5353
make unit-test-go
54-
- name: Check licenses
55-
run: |
56-
cd functions/go
57-
make check-licenses
5854
5955
e2e-ci:
6056
timeout-minutes: 60

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ GO_MOD_DIRS = $(shell find . -name 'go.mod' -exec sh -c 'echo \"$$(dirname "{}")
4848
tidy:
4949
@for f in $(GO_MOD_DIRS); do (cd $$f; echo "Tidying $$f"; go mod tidy) || exit 1; done
5050

51-
check-licenses:
52-
cd functions/go && $(MAKE) check-licenses
53-
cd contrib/functions/go && $(MAKE) check-licenses
54-
55-
add-licenses:
56-
cd functions/go && $(MAKE) add-licenses
57-
cd contrib/functions/go && $(MAKE) add-licenses
58-
5951
verify-docs:
6052
go install github.com/monopole/[email protected]
6153
(cd scripts/patch_reader/ && go build -o patch_reader .)

contrib/functions/go/Makefile

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ FUNCTION_TESTS := $(patsubst %,%-TEST,$(FUNCTIONS))
2828
# Targets for generating all functions docs
2929
FUNCTION_GENERATE_DOCS := $(patsubst %,%-GENERATE,$(FUNCTIONS))
3030

31-
FUNCTION_CHECKLICENSES := $(patsubst %,%-CHECKLICENSES,$(FUNCTIONS))
32-
# Targets to build functions
3331
FUNCTION_BUILDS := $(patsubst %,%-BUILD,$(FUNCTIONS))
3432
# Targets to push images
3533
FUNCTION_PUSH := $(patsubst %,%-PUSH,$(FUNCTIONS))
@@ -78,32 +76,13 @@ push: $(FUNCTION_PUSH) ## Push images to registry. WARN: This operation should o
7876
$(FUNCTION_PUSH):
7977
$(MAKE) CURRENT_FUNCTION=$(subst -PUSH,,$@) TAG=$(TAG) DEFAULT_CR=$(DEFAULT_CONTRIB_CR) func-push
8078

81-
.PHONY: check-licenses
82-
check-licenses: install-go-licenses $(FUNCTION_CHECKLICENSES)
83-
84-
add-licenses:
85-
@echo Update license in path: contrib/functions/go
86-
GOBIN=$(GOBIN) ../../../hack/update-license.sh
87-
88-
.PHONY: $(FUNCTION_CHECKLICENSES)
89-
$(FUNCTION_CHECKLICENSES):
90-
$(MAKE) CURRENT_FUNCTION=$(subst -CHECKLICENSES,,$@) func-check-licenses
91-
92-
install-go-licenses:
93-
ifeq (, $(shell which go-licenses))
94-
../../../scripts/install-go-licenses.sh
95-
GO_LICENSES=$(GOPATH)/bin/go-licenses
96-
else
97-
GO_LICENSES=$(shell which go-licenses)
98-
endif
99-
10079
install-mdtogo:
10180
go install github.com/kptdev/kpt/mdtogo@main
10281

10382
# Recipes for individual function
10483
.PHONY: func-fix func-vet func-fmt func-test func-lint \
105-
func-build func-push func-verify func-check-licenses docs-generate
106-
func-verify: docs-generate func-fix func-vet func-fmt func-test func-lint func-check-licenses
84+
func-build func-push func-verify docs-generate
85+
func-verify: docs-generate func-fix func-vet func-fmt func-test func-lint
10786

10887
func-fix:
10988
cd $(CURRENT_FUNCTION) && go fix ./...
@@ -122,10 +101,6 @@ func-test:
122101
func-vet:
123102
cd $(CURRENT_FUNCTION) && go vet ./...
124103

125-
func-check-licenses: install-go-licenses
126-
@echo Checking licenses for $(CURRENT_FUNCTION)...
127-
cd $(CURRENT_FUNCTION) && $(GO_LICENSES) check .
128-
129104
func-build: func-verify
130105
@echo Building image for $(CURRENT_FUNCTION)...
131106
../../../scripts/go-function-release.sh build contrib

contrib/functions/ts/Makefile

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GOBIN := $(shell go env GOPATH)/bin
2222
help: ## Print this help
2323
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
2424

25-
.PHONY: test build npm-ci push check-licenses
25+
.PHONY: test build npm-ci push
2626

2727
# Edit this list to contain all ts functions
2828
FUNCTIONS := \
@@ -32,7 +32,6 @@ FUNCTIONS := \
3232
# Targets for running all function tests
3333
FUNCTION_TESTS := $(patsubst %,%-TEST,$(FUNCTIONS))
3434

35-
FUNCTION_CHECKLICENSES := $(patsubst %,%-CHECKLICENSES,$(FUNCTIONS))
3635
# Targets to build functions
3736
FUNCTION_BUILDS := $(patsubst %,%-BUILD,$(FUNCTIONS))
3837
# Targets to push function images
@@ -66,27 +65,14 @@ push: $(FUNCTION_PUSH) ## Push images to registry. WARN: This operation should o
6665
$(FUNCTION_PUSH):
6766
$(MAKE) CURRENT_FUNCTION=$(subst -PUSH,,$@) TAG=$(TAG) DEFAULT_CR=$(CR) func-push
6867

69-
check-licenses: $(FUNCTION_CHECKLICENSES) ## Run license checker for source files
70-
71-
add-licenses:
72-
@echo Update license in path: contrib/functions/ts
73-
GOBIN=$(GOBIN) ../../../hack/update-license.sh
74-
75-
.PHONY: $(FUNCTION_CHECKLICENSES)
76-
$(FUNCTION_CHECKLICENSES):
77-
$(MAKE) CURRENT_FUNCTION=$(subst -CHECKLICENSES,,$@) func-check-licenses
78-
7968
# Recipes for individual function
80-
.PHONY: func-test func-check-licenses func-build func-push func-npm-ci
69+
.PHONY: func-test func-build func-push func-npm-ci
8170
func-npm-ci:
8271
cd $(CURRENT_FUNCTION) && npm ci --ignore-scripts
8372

84-
func-test: func-npm-ci func-check-licenses
73+
func-test: func-npm-ci
8574
cd $(CURRENT_FUNCTION) && npm test
8675

87-
func-check-licenses:
88-
cd $(CURRENT_FUNCTION) && npm run check-licenses
89-
9076
func-build: func-test
9177
../../../scripts/ts-function-release.sh build contrib
9278

contrib/functions/ts/analyze-istio/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"watch": "tsc --watch",
1111
"clean": "rm -Rf node_modules/ dist/",
1212
"lint": "tslint -p package.json && prettier \"src/**\" \"*.json\" --check",
13-
"check-licenses": "license-checker --onlyAllow 'Apache-2.0;MIT;BSD;BSD-2-Clause;BSD-3-Clause;ISC;CC-BY-3.0;CC0-1.0;Unlicense'",
1413
"format": "prettier \"src/**\" \"*.json\" --write",
1514
"pretest": "npm run build",
1615
"test": "jasmine --config=jasmine.json",

contrib/functions/ts/sops/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"watch": "tsc --watch",
1111
"clean": "rm -Rf node_modules/ dist/",
1212
"lint": "tslint -p package.json && prettier \"src/**\" \"*.json\" --check",
13-
"check-licenses": "license-checker --onlyAllow 'Apache-2.0;MIT;BSD;BSD-2-Clause;BSD-3-Clause;ISC;CC-BY-3.0;CC0-1.0;Unlicense'",
1413
"format": "prettier \"src/**\" \"*.json\" --write",
1514
"pretest": "npm run build",
1615
"test": "jasmine --config=jasmine.json",

functions/go/Makefile

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ FUNCTION_TESTS := $(patsubst %,%-TEST,$(FUNCTIONS))
5151
# Targets for generating all functions docs
5252
FUNCTION_GENERATE_DOCS := $(patsubst %,%-GENERATE,$(FUNCTIONS))
5353

54-
FUNCTION_CHECKLICENSES := $(patsubst %,%-CHECKLICENSES,$(FUNCTIONS))
5554
# Targets to build functions
5655
FUNCTION_BUILDS := $(patsubst %,%-BUILD,$(FUNCTIONS))
5756
# Targets to push images
@@ -101,32 +100,13 @@ push: $(FUNCTION_PUSH) ## Push images to registry. WARN: This operation should o
101100
$(FUNCTION_PUSH):
102101
$(MAKE) CURRENT_FUNCTION=$(subst -PUSH,,$@) TAG=$(TAG) DEFAULT_CR=$(DEFAULT_CR) func-push
103102

104-
.PHONY: check-licenses
105-
check-licenses: install-go-licenses $(FUNCTION_CHECKLICENSES)
106-
107-
add-licenses:
108-
@echo Update license in path: functions/go
109-
GOBIN=$(GOBIN) ../../hack/update-license.sh
110-
111-
.PHONY: $(FUNCTION_CHECKLICENSES)
112-
$(FUNCTION_CHECKLICENSES):
113-
$(MAKE) CURRENT_FUNCTION=$(subst -CHECKLICENSES,,$@) func-check-licenses
114-
115-
install-go-licenses:
116-
ifeq (, $(shell which go-licenses))
117-
../../scripts/install-go-licenses.sh
118-
GO_LICENSES=$(GOPATH)/bin/go-licenses
119-
else
120-
GO_LICENSES=$(shell which go-licenses)
121-
endif
122-
123103
install-mdtogo:
124104
go install github.com/kptdev/kpt/mdtogo@main
125105

126106
# Recipes for individual function
127107
.PHONY: func-fix func-vet func-fmt func-test func-lint \
128-
func-build func-push func-verify func-check-licenses docs-generate add-licenses
129-
func-verify: docs-generate func-fix func-vet func-fmt func-test func-lint func-check-licenses
108+
func-build func-push func-verify docs-generate
109+
func-verify: docs-generate func-fix func-vet func-fmt func-test func-lint
130110

131111
func-fix:
132112
cd $(CURRENT_FUNCTION) && go fix ./...
@@ -145,10 +125,6 @@ func-test:
145125
func-vet:
146126
cd $(CURRENT_FUNCTION) && go vet ./...
147127

148-
func-check-licenses: install-go-licenses
149-
@echo Checking licenses for $(CURRENT_FUNCTION)...
150-
cd $(CURRENT_FUNCTION) && $(GO_LICENSES) check .
151-
152128
func-build: func-verify
153129
@echo Building image for $(CURRENT_FUNCTION)...
154130
../../scripts/go-function-release.sh build curated

functions/ts/Makefile

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GOBIN := $(shell go env GOPATH)/bin
2323
help: ## Print this help
2424
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
2525

26-
.PHONY: test build npm-ci push check-licenses
26+
.PHONY: test build npm-ci push
2727

2828
# Edit this list to contain all ts functions
2929
FUNCTIONS := \
@@ -33,7 +33,6 @@ FUNCTIONS := \
3333
# Targets for running all function tests
3434
FUNCTION_TESTS := $(patsubst %,%-TEST,$(FUNCTIONS))
3535

36-
FUNCTION_CHECKLICENSES := $(patsubst %,%-CHECKLICENSES,$(FUNCTIONS))
3736
# Targets to build functions
3837
FUNCTION_BUILDS := $(patsubst %,%-BUILD,$(FUNCTIONS))
3938
# Targets to push function images
@@ -67,27 +66,14 @@ push: $(FUNCTION_PUSH) ## Push images to registry. WARN: This operation should o
6766
$(FUNCTION_PUSH):
6867
$(MAKE) CURRENT_FUNCTION=$(subst -PUSH,,$@) TAG=$(TAG) DEFAULT_CR=$(CR) func-push
6968

70-
check-licenses: $(FUNCTION_CHECKLICENSES) ## Run license checker for source files
71-
72-
add-licenses:
73-
@echo Update license in path: functions/ts
74-
GOBIN=$(GOBIN) ../../hack/update-license.sh
75-
76-
.PHONY: $(FUNCTION_CHECKLICENSES)
77-
$(FUNCTION_CHECKLICENSES):
78-
$(MAKE) CURRENT_FUNCTION=$(subst -CHECKLICENSES,,$@) func-check-licenses
79-
8069
# Recipes for individual function
81-
.PHONY: func-test func-check-licenses func-build func-push func-npm-ci
70+
.PHONY: func-test func-build func-push func-npm-ci
8271
func-npm-ci:
8372
cd $(CURRENT_FUNCTION) && npm ci --ignore-scripts
8473

85-
func-test: func-npm-ci func-check-licenses
74+
func-test: func-npm-ci
8675
cd $(CURRENT_FUNCTION) && npm test
8776

88-
func-check-licenses:
89-
cd $(CURRENT_FUNCTION) && npm run check-licenses
90-
9177
func-build: func-test
9278
../../scripts/ts-function-release.sh build curated
9379

functions/ts/generate-folders/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"prepare": "npm run build",
77
"lint": "eslint -c .eslintrc.js --ext .ts \"src/**\"",
88
"format": "prettier \"src/**\" \"*.json\" --write",
9-
"check-licenses": "license-checker --production --json --onlyAllow=\"Apache-2.0;MIT;BSD;BSD-2-Clause;BSD-3-Clause;Python-2.0;ISC;CC-BY-3.0;CC0-1.0;Unlicense;BlueOak-1.0.0\"",
109
"build": "tsc",
1110
"watch": "tsc --watch",
1211
"clean": "rimraf node_modules dist",

functions/ts/kubeval/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"watch": "tsc --watch",
1111
"clean": "rimraf node_modules dist",
1212
"lint": "eslint -c .eslintrc.js --fix --ext .ts \"src/**\"",
13-
"check-licenses": "license-checker --onlyAllow 'Apache-2.0;MIT;BSD;BSD-2-Clause;BSD-3-Clause;Python-2.0;BlueOak-1.0.0;ISC;CC-BY-3.0;CC0-1.0;Unlicense'",
1413
"format": "prettier \"src/**\" \"**/*.json\" --write",
1514
"pretest": "npm run build",
1615
"test": "jasmine --config=jasmine.json",

0 commit comments

Comments
 (0)