Skip to content
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

remove the shell wrapper #2843

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 1 addition & 27 deletions hack/generate-knative.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
Usage: $(basename $0) <generators> <client-package> <apis-package> <groups-versions> ...

<generators> the generators comma separated to run (deepcopy,defaulter,client,lister,informer) or "all".
<client-package> the client package dir (e.g. github.com/example/project/pkg/clientset).
<apis-package> the external types dir (e.g. github.com/example/api or github.com/example/project/pkg/apis).
<groups-versions> the groups and their versions in the format "groupA:v1,v2 groupB:v1 groupC:v2", relative
to <api-package>.
... 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"
Expand All @@ -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"
Expand Down Expand Up @@ -90,3 +63,4 @@ if grep -qw "injection" <<<"${GENS}"; then
--output-package ${OUTPUT_PKG} \
"$@"
fi