github.com/oam-dev/kubevela@v1.9.11/apis/generate.go (about) 1 //go:build generate 2 // +build generate 3 4 /* 5 Copyright 2021 The KubeVela Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 */ 19 20 // See the below link for details on what is happening here. 21 // https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module 22 23 // NOTE(@wonderflow) We don't remove existing CRDs here, because the crd folders contain not only auto generated. 24 25 // Generate deepcopy methodsets and CRD manifests 26 //go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:crdVersions=v1,generateEmbeddedObjectMeta=true output:artifacts:config=../config/crd/base 27 28 package apis 29 30 import ( 31 _ "sigs.k8s.io/controller-tools/cmd/controller-gen" //nolint:typecheck 32 )