Skip to content

Commit

Permalink
build: use bazel build (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster authored Jul 6, 2020
1 parent 9b420e4 commit a228c6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
26 changes: 9 additions & 17 deletions packages/google-cloud-translate/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,35 @@
{
"git": {
"name": ".",
"remote": "https://github.com/googleapis/nodejs-translate.git",
"sha": "548d1e5219141b293631087723ee111382a8e857"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "a3a0bf0f6291d69f2ff3df7fcd63d28ee20ac727",
"internalRef": "310060413"
"remote": "[email protected]:googleapis/nodejs-translate.git",
"sha": "1ae1dba21e29d28c768085d6381b0953c69dada2"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7"
"sha": "303271797a360f8a439203413f13a160f2f5b3b4"
}
}
],
"destinations": [
{
"client": {
"source": "googleapis",
"apiName": "translate",
"apiName": "translation",
"apiVersion": "v3beta1",
"language": "typescript",
"generator": "gapic-generator-typescript"
"language": "nodejs",
"generator": "bazel"
}
},
{
"client": {
"source": "googleapis",
"apiName": "translate",
"apiName": "translation",
"apiVersion": "v3",
"language": "typescript",
"generator": "gapic-generator-typescript"
"language": "nodejs",
"generator": "bazel"
}
}
]
Expand Down
14 changes: 3 additions & 11 deletions packages/google-cloud-translate/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,11 @@
import logging

# Run the gapic generator
gapic = gcp.GAPICMicrogenerator()
gapic = gcp.GAPICBazel()
versions = ['v3beta1', 'v3']
name = 'translate'
name = 'translation'
for version in versions:
library = gapic.typescript_library(
name,
proto_path=f"google/cloud/{name}/{version}",
generator_args={
"grpc-service-config": f"google/cloud/{name}/{version}/{name}_grpc_service_config.json",
"package-name": f"@google-cloud/{name}"
},
extra_proto_files=['google/cloud/common_resources.proto'],
version=version)
library = gapic.node_library(name, version, proto_path=f'google/cloud/translate/{version}')
s.copy(library, excludes=['README.md', 'package.json', 'src/index.ts'])

logging.basicConfig(level=logging.DEBUG)
Expand Down

0 comments on commit a228c6e

Please sign in to comment.