2017-10-28 14:08:31 -07:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
2018-06-04 23:33:56 +02:00
|
|
|
# Copyright 2018 The Rook Authors. All rights reserved.
|
2017-10-28 14:08:31 -07:00
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
2021-08-30 12:58:17 -06:00
|
|
|
GROUP_VERSIONS="rook.io:v1alpha2 ceph.rook.io:v1"
|
2020-03-08 15:12:57 +09:00
|
|
|
|
2017-10-28 14:08:31 -07:00
|
|
|
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
2021-01-28 17:07:25 +01:00
|
|
|
|
2021-02-01 16:34:42 +01:00
|
|
|
# CODE GENERATION
|
|
|
|
|
# we run deepcopy and client,lister,informer generations separately so we can use the flag "--plural-exceptions"
|
|
|
|
|
# which is only known by client,lister,informer binary and not the deepcopy binary
|
|
|
|
|
|
|
|
|
|
# run code deepcopy generation
|
2021-04-20 02:53:36 +00:00
|
|
|
bash ${CODE_GENERATOR}/generate-groups.sh \
|
2021-02-01 16:34:42 +01:00
|
|
|
deepcopy \
|
2018-06-09 15:43:50 +02:00
|
|
|
github.com/rook/rook/pkg/client \
|
|
|
|
|
github.com/rook/rook/pkg/apis \
|
2020-03-30 15:34:24 +09:00
|
|
|
"${GROUP_VERSIONS}" \
|
2021-02-01 14:45:41 +01:00
|
|
|
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../../../.." \
|
2020-03-30 15:34:24 +09:00
|
|
|
--go-header-file "${scriptdir}/boilerplate.go.txt"
|
2021-02-01 16:34:42 +01:00
|
|
|
|
|
|
|
|
# run code client,lister,informer generation
|
2021-04-20 02:53:36 +00:00
|
|
|
bash ${CODE_GENERATOR}/generate-groups.sh \
|
2021-02-01 16:34:42 +01:00
|
|
|
client,lister,informer \
|
|
|
|
|
github.com/rook/rook/pkg/client \
|
|
|
|
|
github.com/rook/rook/pkg/apis \
|
|
|
|
|
"${GROUP_VERSIONS}" \
|
|
|
|
|
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../../../.." \
|
|
|
|
|
--go-header-file "${scriptdir}/boilerplate.go.txt" \
|
|
|
|
|
--plural-exceptions "CephNFS:CephNFSes" \
|