github.com/argoproj/argo-cd@v1.8.7/hack/update-codegen.sh (about) 1 #!/bin/bash 2 3 # Copyright 2017 The Kubernetes Authors. 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 set -x 18 set -o errexit 19 set -o nounset 20 set -o pipefail 21 22 SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/.. 23 . ${SCRIPT_ROOT}/hack/versions.sh 24 CODEGEN_PKG=$GOPATH/pkg/mod/k8s.io/code-generator@${kube_version} 25 TARGET_SCRIPT=/tmp/generate-groups.sh 26 27 ( 28 cd $CODEGEN_PKG 29 go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen} 30 ) 31 32 export GO111MODULE=off 33 34 sed -e '/go install/d' ${CODEGEN_PKG}/generate-groups.sh > ${TARGET_SCRIPT} 35 36 bash -x ${TARGET_SCRIPT} "deepcopy,client,informer,lister" \ 37 github.com/argoproj/argo-cd/pkg/client github.com/argoproj/argo-cd/pkg/apis \ 38 "application:v1alpha1" \ 39 --go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt