2019-02-06 12:52:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
set -o pipefail
|
|
|
|
|
2019-05-13 18:24:02 +00:00
|
|
|
case "$(uname -s)" in
|
|
|
|
Linux*) linkutil=readlink;;
|
|
|
|
Darwin*) linkutil=greadlink;;
|
|
|
|
*) machine="UNKNOWN:${unameOut}"
|
|
|
|
esac
|
|
|
|
|
2019-02-06 17:51:47 +00:00
|
|
|
# get nirmata root
|
|
|
|
NIRMATA_DIR=$(dirname ${BASH_SOURCE})/..
|
2019-05-13 18:24:02 +00:00
|
|
|
NIRMATA_ROOT=$(${linkutil} -f ${NIRMATA_DIR})
|
2019-02-06 12:52:09 +00:00
|
|
|
|
2019-02-06 17:51:47 +00:00
|
|
|
# get relative path to code generation script
|
|
|
|
CODEGEN_PKG=${NIRMATA_DIR}/vendor/k8s.io/code-generator
|
2019-02-06 12:52:09 +00:00
|
|
|
|
2019-02-06 17:51:47 +00:00
|
|
|
# get relative path of nirmata
|
|
|
|
NIRMATA_PKG=${NIRMATA_ROOT#"${GOPATH}/src/"}
|
|
|
|
|
|
|
|
# perform code generation
|
|
|
|
${CODEGEN_PKG}/generate-groups.sh \
|
|
|
|
"deepcopy,client,informer,lister" \
|
|
|
|
${NIRMATA_PKG}/pkg/client \
|
2019-08-17 16:58:14 +00:00
|
|
|
${NIRMATA_PKG}/pkg/api \
|
2019-11-13 21:41:08 +00:00
|
|
|
kyverno:v1
|