File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -eux
4+
5+ IS_CONTAINER=" ${IS_CONTAINER:- false} "
6+ ARTIFACTS=" ${ARTIFACTS:-/ tmp} "
7+ CONTAINER_RUNTIME=" ${CONTAINER_RUNTIME:- podman} "
8+
9+ if [ " ${IS_CONTAINER} " != " false" ]; then
10+ export XDG_CACHE_HOME=/tmp/.cache
11+ eval " $( go env) "
12+ INPUT_FILES=" \
13+ config/certmanager/*.yaml
14+ config/crd/*.yaml
15+ config/crd/bases/*.yaml
16+ config/crd/patches/*.yaml
17+ config/default/*.yaml
18+ config/manager/*.yaml
19+ config/rbac/*.yaml
20+ config/webhook/*.yaml
21+ config/*.yaml
22+ api/v1alpha1/zz_generated.*.go"
23+
24+ # shellcheck disable=SC2086
25+ cksum $INPUT_FILES > " $ARTIFACTS /lint.cksums.before"
26+ export VERBOSE=" --verbose"
27+ make generate
28+ # shellcheck disable=SC2086
29+ cksum $INPUT_FILES > " $ARTIFACTS /lint.cksums.after"
30+ diff " $ARTIFACTS /lint.cksums.before" " $ARTIFACTS /lint.cksums.after"
31+ else
32+ " ${CONTAINER_RUNTIME} " run --rm \
33+ --env IS_CONTAINER=TRUE \
34+ --volume " ${PWD} :/data:rw,z" \
35+ --entrypoint sh \
36+ --workdir /data \
37+ registry.hub.docker.com/library/golang:1.13.7 \
38+ /data/hack/codegen.sh
39+ fi ;
You can’t perform that action at this time.
0 commit comments