cert-manager/hack/update-codegen.sh

17 lines
605 B
Bash
Executable File

#!/bin/bash
# The only argument this script should ever be called with is '--verify-only'
set -o errexit
set -o nounset
set -o pipefail
SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/..
CODEGEN_PKG=${CODEGEN_PKG:-$(CDPATH='' cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
"${CODEGEN_PKG}/generate-groups.sh" "deepcopy,client,informer,lister" \
github.com/jetstack/cert-manager/pkg/client github.com/jetstack/cert-manager/pkg/apis \
certmanager:v1alpha1 \
--output-base "${GOPATH}/src/" \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt"