ci: fix code generation
With the recent bump to Golang 1.15, the code generation was broken. Changing the output-base to the main repo and not the vendor solves the issue and feel more natural too. The command "go mod vendor" only cherry-picks certain files for inclusion in the vendor folder. I suspect the upgrade to Golang 1.15 introduced that behavior. Previously our vendir dir was full and now it has nothing (from rook) that's why the code generator was removing all our interfaces. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
1 parent
6936706d81
commit
32f5bfd6bf
1 file changed
+5
-2
@@ -19,11 +19,14 @@ GROUP_VERSIONS="rook.io:v1 rook.io:v1alpha2 ceph.rook.io:v1 nfs.rook.io:v1alpha1
|
||||
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
codegendir="${scriptdir}/../../vendor/k8s.io/code-generator"
|
||||
|
||||
# ensures the vendor dir has the right deps, e,g. code-generator
|
||||
go mod vendor
|
||||
|
||||
# run code generation
|
||||
bash ${codegendir}/generate-groups.sh \
|
||||
all \
|
||||
github.com/rook/rook/pkg/client \
|
||||
github.com/rook/rook/pkg/apis \
|
||||
"${GROUP_VERSIONS}" \
|
||||
--output-base "${scriptdir}/../../vendor" \
|
||||
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \
|
||||
--go-header-file "${scriptdir}/boilerplate.go.txt"
|
||||
cp -r "${scriptdir}/../../vendor/github.com/rook/rook/pkg" "${scriptdir}/../../"
|
||||
Reference in new issue
Block a user