Skip to content

Commit 5e3d696

Browse files
More logs in codegen script
1 parent 25ae240 commit 5e3d696

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

hack/code-gen.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,31 @@ printf "Start code-gen script \n"
1717

1818
# Install the required binaries with modules enabled
1919
go install k8s.io/code-generator
20+
chmod +x "$GOPATH"/pkg/mod/k8s.io/[email protected]/kube_codegen.sh
2021

2122
printf "Got all dependencies \n"
2223

2324
# Ensure proper package tags are in place (See: https://pkg.go.dev/k8s.io/code-generator/cmd/deepcopy-gen)
2425
printf "Running code generators...\n"
2526

26-
chmod +x "$GOPATH"/pkg/mod/k8s.io/[email protected]/kube_codegen.sh
27-
2827
# Use generate-groups.sh helper script to run all code generators
2928
"$GOPATH"/pkg/mod/k8s.io/[email protected]/kube_codegen.sh all \
3029
github.com/janekbaraniewski/kubeserial/pkg/generated \
3130
github.com/janekbaraniewski/kubeserial/pkg/apis \
3231
v1alpha1
3332

33+
printf "Finished kube_codegen.sh, updating source files...\n"
34+
3435
# Manual copy might be required if output paths are incorrectly set by the tools, adjust paths as needed
3536
if [[ "${COPY_OR_DIFF}" == "copy" ]]; then
37+
printf "Removing old generated files...\n"
3638
rm -rf ./pkg/generated
39+
printf "Populating with new generated files...\n"
3740
mkdir -p ./pkg/generated
3841
cp -r "$GOPATH/src/github.com/janekbaraniewski/kubeserial/pkg/generated/"* ./pkg/generated/
3942
fi
4043

44+
printf "Final checks...\n"
4145
replace_or_compare "$GOPATH/src/github.com/janekbaraniewski/kubeserial/pkg/generated/" ./pkg/generated/
4246

4347
printf "All generators have completed.\n"

0 commit comments

Comments
 (0)