1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00
kube-arangodb/scripts/codegen.sh

24 lines
719 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
SCRIPT_ROOT=$1
THIS_PKG=github.com/arangodb/kube-arangodb
sed -i --posix "s@\^v\[0-9\]\+((alpha|beta)\[0-9\]\+)\?@^v[0-9]+((alpha|beta)[0-9]*)?@g" "${SCRIPT_ROOT}/deps/k8s.io/code-generator/kube_codegen.sh"
source "${SCRIPT_ROOT}/deps/k8s.io/code-generator/kube_codegen.sh"
kube::codegen::gen_helpers \
--boilerplate "${SCRIPT_ROOT}/tools/codegen/boilerplate.go.txt" \
"${SCRIPT_ROOT}/pkg/apis"
kube::codegen::gen_client \
--boilerplate "${SCRIPT_ROOT}/tools/codegen/boilerplate.go.txt" \
--with-watch \
--output-dir "${SCRIPT_ROOT}/pkg/generated" \
--output-pkg "${THIS_PKG}/pkg/generated" \
"${SCRIPT_ROOT}/pkg/apis"