diff options
| author | zhu733756 <talonzhu@yunify.com> | 2021-10-08 11:20:35 +0800 |
|---|---|---|
| committer | zhu733756 <talonzhu@yunify.com> | 2021-10-08 13:05:29 +0800 |
| commit | bc3cc88b39784e8981b9223b675787ff37f0bea7 (patch) | |
| tree | 8fd9cfce8f5de5e5405718d67e4a0eaccafba867 /hack/generate-crds.sh | |
| parent | better code style (diff) | |
| download | kubeedge-bc3cc88b39784e8981b9223b675787ff37f0bea7.tar.gz | |
Add kubebuilder comments to support enum and subresource
Signed-off-by: zhu733756 <talonzhu@yunify.com>
Diffstat (limited to 'hack/generate-crds.sh')
| -rwxr-xr-x | hack/generate-crds.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/hack/generate-crds.sh b/hack/generate-crds.sh index f60fcbe09..009a6a27f 100755 --- a/hack/generate-crds.sh +++ b/hack/generate-crds.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2020 The KubeEdge Authors +# Copyright 2021 The KubeEdge Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ while [ $# -gt 0 ]; do shift done -function :prepare:install: { +function :pre:install: { # install controller-gen tool if not exsit - if [ $(which controller-gen) == "" ]; then + if [ "$(which controller-gen)" == "" ]; then echo "Start to install controller-gen tool" - GO111MODULE=on go get -v sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2 + GO111MODULE=on go install -v sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2 fi } @@ -62,7 +62,7 @@ function :gen:crds: { $(which controller-gen) paths="./..." ${_crdOptions} output:crd:artifacts:config=${_tmpdir} } -function :copy:to:targets { +function :copy:to:destination { # rename files, copy files mkdir -p ${CRD_OUTPUTS}/devices mkdir -p ${CRD_OUTPUTS}/reliablesyncs @@ -92,7 +92,10 @@ function cleanup { rm -rf "${_tmpdir}" } -:prepare:install: +:pre:install: + :gen:crds: -:copy:to:targets + +:copy:to:destination + cleanup
\ No newline at end of file |
