From 1ad5ec0c2d99e41f4fddf9ed131c6dc9bffe17b4 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Wed, 20 Sep 2023 17:16:26 +0000 Subject: [PATCH] feat: filter out `*gapic.legacy.yaml` when parsing `java_gapic_opts` (#2015) --- .../test/resources/gapic_options/example_gapic.legacy.yaml | 1 + .../test/resources/gapic_options/example_gapic_legacy.yaml | 1 + library_generation/utilities.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 library_generation/test/resources/gapic_options/example_gapic.legacy.yaml create mode 100644 library_generation/test/resources/gapic_options/example_gapic_legacy.yaml diff --git a/library_generation/test/resources/gapic_options/example_gapic.legacy.yaml b/library_generation/test/resources/gapic_options/example_gapic.legacy.yaml new file mode 100644 index 0000000000..7da8426f34 --- /dev/null +++ b/library_generation/test/resources/gapic_options/example_gapic.legacy.yaml @@ -0,0 +1 @@ +# this file is only used in testing `get_gapic_opts` in utilities.sh \ No newline at end of file diff --git a/library_generation/test/resources/gapic_options/example_gapic_legacy.yaml b/library_generation/test/resources/gapic_options/example_gapic_legacy.yaml new file mode 100644 index 0000000000..7da8426f34 --- /dev/null +++ b/library_generation/test/resources/gapic_options/example_gapic_legacy.yaml @@ -0,0 +1 @@ +# this file is only used in testing `get_gapic_opts` in utilities.sh \ No newline at end of file diff --git a/library_generation/utilities.sh b/library_generation/utilities.sh index 88d3a13657..d34e467fec 100755 --- a/library_generation/utilities.sh +++ b/library_generation/utilities.sh @@ -59,7 +59,7 @@ get_gapic_opts() { gapic_config="gapic-config=${gapic_config}," fi grpc_service_config=$(find "${proto_path}" -type f -name "*service_config.json") - api_service_config=$(find "${proto_path}" -maxdepth 1 -type f \( -name "*.yaml" ! -name "*gapic.yaml" \)) + api_service_config=$(find "${proto_path}" -maxdepth 1 -type f \( -name "*.yaml" ! -name "*gapic*.yaml" \)) if [ "${rest_numeric_enums}" == "true" ]; then rest_numeric_enums="rest-numeric-enums," else