Skip to content

Commit

Permalink
Added the ability to report errors
Browse files Browse the repository at this point in the history
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
  • Loading branch information
LiZhenCheng9527 committed Jan 16, 2024
1 parent f931992 commit 1df7faf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ jobs:
- name: generate license mirror
run: make mirror-licenses
- name: lint-licenses
run: make lint-licenses
# if restricted > 0, CI will report an error.
run: make lint-licenses | grep -q 'restricted, [1-9][0-9]*' && exit 1 || true
test:
name: Unit test
runs-on: ubuntu-22.04
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@ mod-download-go:
# https://github.com/golang/go/issues/43994
@find -name go.mod -execdir go mod tidy \;

mirror-licenses: mod-download-go
@go install istio.io/tools/cmd/license-lint@latest
.PHONY: mirror-licenses
mirror-licenses: mod-download-go; \
@go install istio.io/tools/cmd/license-lint@latest; \
@rm -fr licenses; \
@license-lint --mirror

.PHONY: lint-licenses
lint-licenses:
@if test -d licenses; then license-lint --config common/config/license-lint.yaml; fi

Expand Down Expand Up @@ -158,7 +161,7 @@ gen: clean \
gen-prom \
gen-prom-thanos \
gen-thanos \
gen-chart
gen-chart

.PHONY: gen-check
gen-check: gen
Expand Down

0 comments on commit 1df7faf

Please sign in to comment.