Skip to content

Commit

Permalink
feat(api): moved virtualization api to separated go module
Browse files Browse the repository at this point in the history
Signed-off-by: Isteb4k <[email protected]>
  • Loading branch information
Isteb4k committed Mar 21, 2024
1 parent a737b08 commit 118bb9c
Show file tree
Hide file tree
Showing 162 changed files with 29,756 additions and 288 deletions.
60 changes: 60 additions & 0 deletions api/Taskfile.dist.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
version: "3"

silent: true

env:
K8S_CODEGEN:
sh: echo $(go env GOMODCACHE)/$(go list -f '{{`{{.Path}}@{{.Version}}`}}' -m k8s.io/code-generator)

tasks:
generate:
desc: "Regenerate all"
deps:
- _ensure:k8s-codegen-mod
- _ensure:k8s-kube-openapi
cmd: ./scripts/update-codegen.sh all

generate:core:
desc: "Regenerate code for core components."
deps:
- _ensure:k8s-codegen-mod
cmd: ./scripts/update-codegen.sh core

generate:subresources:
desc: "Regenerate code for subresources components"
deps:
- _ensure:k8s-codegen-mod
- _ensure:k8s-kube-openapi
cmd: ./scripts/update-codegen.sh subresources

ci:generate:
desc: "Run generations and check git diff to ensure all files are committed"
cmds:
- task: generate
- task: _ci:verify-gen

_ci:verify-gen:
desc: "Check generated files are up-to-date."
internal: true
cmds:
- |
git diff --exit-code || (echo "Please run task gen:api and commit changes" && exit 1)
_ensure:k8s-codegen-mod:
desc: "Ensure k8s.io/codegen module is present"
internal: true
cmds:
- echo -e "Path K8S_CODEGEN=${K8S_CODEGEN} should exists.\nAdd k8s.io/code-generator to go.mod and run go mod download" > /dev/stderr
- exit 1
status:
- |
ls $K8S_CODEGEN && find $K8S_CODEGEN -name \*.sh -exec chmod +x {} \;
_ensure:k8s-kube-openapi:
desc: "Ensure k8s.io/kube-openapi"
internal: true
cmds:
- go install -mod=readonly k8s.io/kube-openapi/cmd/openapi-gen
status:
- |
ls $GOPATH/bin/openapi-gen

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 118bb9c

Please sign in to comment.