forked from redhat-appstudio/jvm-build-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-codegen.sh
executable file
·24 lines (19 loc) · 959 Bytes
/
update-codegen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#
# Generates the typed client for Kubernetes CRDs
# From https://www.openshift.com/blog/kubernetes-deep-dive-code-generation-customresources
#
set -euo pipefail
GOPATH=${GOPATH:-$(go env GOPATH)}
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../../../k8s.io/code-generator)}
echo ""
echo "Using code-generator package version, as instructed in the go.mod file"
echo "The code-generator package is imported via the pkg/kubecodegen dir"
echo "To modify the current version, please modify this in the go.mod"
echo ""
GOFLAGS="" GOPATH=${GOPATH} /bin/bash ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
github.com/redhat-appstudio/jvm-build-service/pkg/client \
github.com/redhat-appstudio/jvm-build-service/pkg/apis \
"jvmbuildservice:v1alpha1" \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt"