diff --git a/hack/generate-knative.sh b/hack/generate-knative.sh index 931e0a425c..3d5cd7e73e 100755 --- a/hack/generate-knative.sh +++ b/hack/generate-knative.sh @@ -14,32 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -o errexit -set -o nounset -set -o pipefail - -# generate-groups generates everything for a project with external types only, e.g. a project based -# on CustomResourceDefinitions. - -if [ "$#" -lt 4 ] || [ "${1}" == "--help" ]; then - cat < ... - - the generators comma separated to run (deepcopy,defaulter,client,lister,informer) or "all". - the client package dir (e.g. github.com/example/project/pkg/clientset). - the external types dir (e.g. github.com/example/api or github.com/example/project/pkg/apis). - the groups and their versions in the format "groupA:v1,v2 groupB:v1 groupC:v2", relative - to . - ... arbitrary flags passed to all generator binaries. - - -Examples: - $(basename $0) all github.com/example/project/pkg/client github.com/example/project/pkg/apis "foo:v1 bar:v1alpha1,v1beta1" - $(basename $0) injection,foo github.com/example/project/pkg/client github.com/example/project/pkg/apis "foo:v1 bar:v1alpha1,v1beta1" -EOF - exit 0 -fi - GENS="$1" CLIENT_PKG="$2" APIS_PKG="$3" @@ -59,7 +33,6 @@ for GVs in ${GROUPS_WITH_VERSIONS}; do done done - if grep -qw "injection" <<<"${GENS}"; then if [[ -z "${OUTPUT_PKG:-}" ]]; then OUTPUT_PKG="${CLIENT_PKG}/injection" @@ -90,3 +63,4 @@ if grep -qw "injection" <<<"${GENS}"; then --output-package ${OUTPUT_PKG} \ "$@" fi +