mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
code-gen: support running from anywhere
Support running generate-groups.sh from any directory, so users can run it from their own projects, instead of forcing them to run it from here. This allows the generators to find and use go source code from a project's vendor directory, for example. Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
This commit is contained in:
parent
d02cf08e27
commit
c5d43d082a
@ -46,7 +46,13 @@ APIS_PKG="$3"
|
||||
GROUPS_WITH_VERSIONS="$4"
|
||||
shift 4
|
||||
|
||||
go install ./$(dirname "${0}")/cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen}
|
||||
(
|
||||
# To support running this script from anywhere, we have to first cd into this directory
|
||||
# so we can install the tools.
|
||||
cd $(dirname "${0}")
|
||||
go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen}
|
||||
)
|
||||
|
||||
function codegen::join() { local IFS="$1"; shift; echo "$*"; }
|
||||
|
||||
# enumerate group versions
|
||||
|
Loading…
Reference in New Issue
Block a user