Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add update command to Makefile #881

Merged
merged 3 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ gen-tools:
go mod download
@bash -c 'go install k8s.io/code-generator/cmd/{client-gen,lister-gen,informer-gen,deepcopy-gen}'

### codegen: Generate codes for clientset, informer, deepcopy, etc.
.PHONY: codegen
codegen: gen-tools
./utils/update-codegen.sh

### verify-codegen: Verify whether the generated codes (clientset, informer, deepcopy, etc) are up to date.
.PHONY: verify-codegen
verify-codegen: gen-tools
Expand All @@ -184,3 +179,22 @@ verify-mdlint:
### verify-all: Verify all verify- rules.
.PHONY: verify-all
verify-all: verify-codegen verify-license verify-mdlint

### update-codegen: Update the generated codes (clientset, informer, deepcopy, etc).
.PHONY: update-codegen
lingsamuel marked this conversation as resolved.
Show resolved Hide resolved
update-codegen: gen-tools
./utils/update-codegen.sh

### update-license: Update license headers.
.PHONY: update-license
update-license:
docker run -it --rm -v $(PWD):/github/workspace apache/skywalking-eyes header fix

### update-mdlint: Update markdown files lint rules.
.PHONY: update-mdlint
update-mdlint:
docker run -it --rm -v $(PWD):/work tmknom/markdownlint '**/*.md' -f --ignore node_modules

### update-all: Update all update- rules.
.PHONY: update-all
update-all: update-codegen update-license update-mdlint
2 changes: 1 addition & 1 deletion utils/verify-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ fi
if [[ $ret -eq 0 ]]; then
echo "Generated codes up to date."
else
echo "Generated codes out of date. Please run \`make codegen\`"
echo "Generated codes out of date. Please run \`make update-codegen\`"
exit 1
fi