Skip to content

Commit

Permalink
feat(hydrator): add sourceHydrator types
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre Gaudreault <[email protected]>
Co-authored-by: Omer Azmon <[email protected]>
Co-authored-by: daengdaengLee <[email protected]>
Co-authored-by: Juwon Hwang (Kevin) <[email protected]>
Co-authored-by: thisishwan2 <[email protected]>
Co-authored-by: mirageoasis <[email protected]>
Co-authored-by: Robin Lieb <[email protected]>
Co-authored-by: miiiinju1 <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

fix(codegen): use kube_codegen.sh deepcopy and client gen correctly

Signed-off-by: Michael Crenshaw <[email protected]>

deepcopy gen

Signed-off-by: Michael Crenshaw <[email protected]>
  • Loading branch information
crenshaw-dev committed Nov 3, 2024
1 parent 59ea2a8 commit 6d180a7
Show file tree
Hide file tree
Showing 24 changed files with 8,347 additions and 1,669 deletions.
123 changes: 123 additions & 0 deletions assets/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PATH="${PROJECT_ROOT}/dist:${PATH}"
GOPATH=$(go env GOPATH)
GOPATH_PROJECT_ROOT="${GOPATH}/src/github.com/argoproj/argo-cd"

TARGET_SCRIPT=/tmp/kube_codegen.sh
TARGET_SCRIPT=kube_codegen.sh

# codegen utilities are installed outside of kube_codegen.sh so remove the `go install` step in the script.
sed -e '/go install/d' ${PROJECT_ROOT}/vendor/k8s.io/code-generator/kube_codegen.sh >${TARGET_SCRIPT}
Expand All @@ -39,11 +39,18 @@ sed -i.bak -e 's#${gobin}/##g' ${TARGET_SCRIPT}
[ -e ./v2 ] || ln -s . v2
[ -e "${GOPATH_PROJECT_ROOT}" ] || (mkdir -p "$(dirname "${GOPATH_PROJECT_ROOT}")" && ln -s "${PROJECT_ROOT}" "${GOPATH_PROJECT_ROOT}")

bash -x ${TARGET_SCRIPT} "deepcopy,client,informer,lister" \
github.com/argoproj/argo-cd/v2/pkg/client github.com/argoproj/argo-cd/v2/pkg/apis \
"application:v1alpha1" \
--go-header-file "${PROJECT_ROOT}/hack/custom-boilerplate.go.txt" \
--output-base "${GOPATH}/src"
# shellcheck source=pkg/apis/application/v1alpha1/kube_codegen.sh
. ${TARGET_SCRIPT}

kube::codegen::gen_helpers pkg/apis/application/v1alpha1
kube::codegen::gen_client pkg/apis \
--output-dir pkg/client \
--output-pkg github.com/argoproj/argo-cd/v2/pkg/client \
--boilerplate "${PROJECT_ROOT}/hack/custom-boilerplate.go.txt" \
--with-watch

rm ${TARGET_SCRIPT}
rm ${TARGET_SCRIPT}.bak

[ -L "${GOPATH_PROJECT_ROOT}" ] && rm -rf "${GOPATH_PROJECT_ROOT}"
[ -L ./v2 ] && rm -rf v2
Loading

0 comments on commit 6d180a7

Please sign in to comment.