Skip to content

Commit

Permalink
build: use bazel for library generation (#477)
Browse files Browse the repository at this point in the history
* build: use bazel for library generation

* chore: trigger CI
  • Loading branch information
alexander-fenster authored and sofisl committed Oct 13, 2022
1 parent 99b5c0b commit 23f0c8f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
18 changes: 9 additions & 9 deletions packages/google-cloud-language/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
{
"git": {
"name": ".",
"remote": "https://github.com/googleapis/nodejs-language.git",
"sha": "ec8af51419d1c0ccaa6e73cdee4bbcb4379b0d42"
"remote": "git@github.com:googleapis/nodejs-language.git",
"sha": "2361fd3f01eac2216a7c2d98e026a70286ce0731"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "6dfd72d028a0d0a43764e060f7b15e004385c3a1",
"internalRef": "310168181"
"sha": "a60b165895ad1f100d7014c74b7df512f9377fdb",
"internalRef": "318104666"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "b10590a4a1568548dd13cfcea9aa11d40898144b"
"sha": "ce68c0e70d36c93ffcde96e9908fb4d94aa4f2e4"
}
}
],
Expand All @@ -29,17 +29,17 @@
"source": "googleapis",
"apiName": "language",
"apiVersion": "v1",
"language": "typescript",
"generator": "gapic-generator-typescript"
"language": "nodejs",
"generator": "bazel"
}
},
{
"client": {
"source": "googleapis",
"apiName": "language",
"apiVersion": "v1beta2",
"language": "typescript",
"generator": "gapic-generator-typescript"
"language": "nodejs",
"generator": "bazel"
}
}
]
Expand Down
15 changes: 4 additions & 11 deletions packages/google-cloud-language/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,13 @@
AUTOSYNTH_MULTIPLE_COMMITS = True


gapic = gcp.GAPICMicrogenerator()
gapic = gcp.GAPICBazel()
versions = ['v1', 'v1beta2']
# tasks has two product names, and a poorly named artman yaml
for version in versions:
library = gapic.typescript_library(
library = gapic.node_library(
'language',
generator_args={
"grpc-service-config": f"google/cloud/language/{version}/language_grpc_service_config.json",
"package-name": f"@google-cloud/language"
},
proto_path=f'/google/cloud/language/{version}',
version=version)

# skip index, protos, package.json, and README.md
version,
)
s.copy(
library,
excludes=['package.json', 'README.md'])
Expand Down

0 comments on commit 23f0c8f

Please sign in to comment.