Skip to content

Commit

Permalink
fix: synth.py clean up for multiple version (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
summer-ji-eng authored May 6, 2020
1 parent 0bbfdd7 commit ebdc28a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
8 changes: 4 additions & 4 deletions packages/google-cloud-kms/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// 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 KeyManagementServiceClient = v1.KeyManagementServiceClient;

export {v1, KeyManagementServiceClient};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v1, KeyManagementServiceClient};
import * as protos from '../protos/protos';
export {protos};
12 changes: 10 additions & 2 deletions packages/google-cloud-kms/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@
"git": {
"name": ".",
"remote": "[email protected]:googleapis/nodejs-kms.git",
"sha": "31837decd96e2e09946d2458be3be0d0f6a35c3b"
"sha": "e6083a9c3d1e3c97785faee3bdfbe8bcce14d3ee"
}
},
{
"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"
}
}
],
Expand Down
23 changes: 12 additions & 11 deletions packages/google-cloud-kms/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,25 @@
versions = ['v1']
for version in versions:
library = gapic.typescript_library(
'kms', version,
generator_args={
"grpc-service-config": f"google/cloud/kms/{version}/cloudkms_grpc_service_config.json",
"package-name": "@google-cloud/kms",
"iam-service": "true"
},
proto_path=f'/google/cloud/kms/{version}',
extra_proto_files=['google/cloud/common_resources.proto']
)
'kms', version,
generator_args={
"grpc-service-config": f"google/cloud/kms/{version}/cloudkms_grpc_service_config.json",
"package-name": "@google-cloud/kms",
"iam-service": "true"
},
proto_path=f'/google/cloud/kms/{version}',
extra_proto_files=['google/cloud/common_resources.proto']
)
# skip index, package.json, and README.md
s.copy(
library,
excludes=['package.json', 'README.md', 'src/index.ts'],
excludes=['package.json', 'README.md'],
)

# Copy common templates
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()

0 comments on commit ebdc28a

Please sign in to comment.