From a329db210db15e6a34b4fa6cae400b52f62dafa2 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Wed, 6 May 2020 16:48:07 -0700 Subject: [PATCH] fix: synth.py clean up for multiple version (#335) --- src/index.ts | 6 ++++-- synth.metadata | 12 ++++++++++-- synth.py | 5 +++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 61507dd2..214766df 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,12 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; + const DeviceManagerClient = v1.DeviceManagerClient; + export {v1, DeviceManagerClient}; export default {v1, DeviceManagerClient}; import * as protos from '../protos/protos'; diff --git a/synth.metadata b/synth.metadata index 85fbda10..964d5891 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,22 @@ "git": { "name": ".", "remote": "git@github.com:googleapis/nodejs-iot.git", - "sha": "7ca140e19076ba61234478ffcb2d02e4cc6f816b" + "sha": "f4a35b369297d7ff91793f59a0451931d4abff94" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "6dfd72d028a0d0a43764e060f7b15e004385c3a1", + "internalRef": "310168181" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" + "sha": "756bc4dfc24e8bc4c5dd4116daa41a0440ebf5a0" } } ], diff --git a/synth.py b/synth.py index 8d6cd677..4ef37e61 100644 --- a/synth.py +++ b/synth.py @@ -34,7 +34,7 @@ "grpc-service-config": f"google/cloud/iot/{version}/cloudiot_grpc_service_config.json", "package-name": "@google-cloud/iot", "main-service": "iot" - }, + }, proto_path=f'/google/cloud/iot/{version}', extra_proto_files=['google/cloud/common_resources.proto'], version=version) @@ -47,7 +47,8 @@ # Copy common templated files common_templates = gcp.CommonTemplates() -templates = common_templates.node_library(source_location='build/src') +templates = common_templates.node_library( + source_location='build/src', versions=versions, default_version='v1') s.copy(templates) node.postprocess_gapic_library()