Skip to content

Commit

Permalink
feat: add update command to Makefile (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangoGoForward committed Feb 23, 2022
1 parent 545d22d commit 26a1f43
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
24 changes: 19 additions & 5 deletions Makefile
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
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
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

0 comments on commit 26a1f43

Please sign in to comment.