-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Minor nits in update-codegen.sh #2028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,10 +18,15 @@ set -o errexit | |
| set -o nounset | ||
| set -o pipefail | ||
|
|
||
| if [ -z "${GOPATH:-}" ]; then | ||
| export GOPATH=$(go env GOPATH) | ||
| fi | ||
|
|
||
| source $(dirname $0)/../vendor/github.com/knative/test-infra/scripts/library.sh | ||
|
|
||
| CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)} | ||
|
|
||
|
|
||
| # generate the code with: | ||
| # --output-base because this script should also be able to run inside the vendor dir of | ||
| # k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir | ||
|
|
@@ -32,10 +37,12 @@ ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ | |
| --go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt | ||
|
|
||
| # Depends on generate-groups.sh to install bin/deepcopy-gen | ||
| ${GOPATH}/bin/deepcopy-gen --input-dirs \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I was thinking in something simpler, just the logic in this script. |
||
| github.com/knative/serving/pkg/reconciler/v1alpha1/revision/config,github.com/knative/serving/pkg/autoscaler,github.com/knative/serving/pkg/logging \ | ||
| ${GOPATH}/bin/deepcopy-gen \ | ||
| -O zz_generated.deepcopy \ | ||
| --go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt | ||
| --go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt \ | ||
| -i github.com/knative/serving/pkg/reconciler/v1alpha1/revision/config \ | ||
| -i github.com/knative/serving/pkg/autoscaler \ | ||
| -i github.com/knative/serving/pkg/logging | ||
|
|
||
| # Make sure our dependencies are up-to-date | ||
| ${REPO_ROOT_DIR}/hack/update-deps.sh | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice. We should move this to
library.sh, so all scripts will benefit from it.