...
1#!/bin/bash
2
3source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
4
5# Build codegen-crds when it's not present and not overriden for a specific file.
6if [ -z "${CODEGEN:-}" ];then
7 ${TOOLS_MAKE} codegen
8 CODEGEN="${TOOLS_OUTPUT}/codegen"
9fi
10
11# This runs the codegen utility against the entire set of API types.
12# It has two possible args, the GENERATOR and the EXTRA_ARGS.
13# GENERATOR is the name of the generator to run, which could be one of compatibility,
14# deepcopy, schemapatch or swaggerdocs.
15# EXTRA_ARGS are additional arguments to pass to the generator, usually this would be
16# --verify so that the generator verifies the output rather than writing it.
17"${CODEGEN}" ${GENERATOR:-} --base-dir "${SCRIPT_ROOT}" -v 1 ${EXTRA_ARGS:-}
View as plain text