@@ -23,6 +23,7 @@ cd $HOME/google-cloud-cpp
2323``` shell
2424library=... # The name of your new library in the google-cloud-cpp repository
2525subdir=" google/cloud/${library} " # The path in googleapis repo, may not start with google/cloud/
26+ bazel_output_base=" $( bazel info output_base) "
2627```
2728
2829## Verify the C++ rules exist
@@ -70,6 +71,13 @@ example, [here][retryable-status-codes].
7071
7172Manually edit ` generator/generator_config.textproto ` and add the new service.
7273
74+ Find the list of ` .proto ` files that will need to be included:
75+
76+ ``` shell
77+ find " ${bazel_output_base} /external/com_google_googleapis/${subdir} " -name ' *.proto' -print0 |
78+ xargs -0 grep -l ' ^service'
79+ ```
80+
7381> ** Note:**
7482> While older service definitions may not include the version specification
7583> in the ` product_path ` field, all new services are required to include the
@@ -119,7 +127,6 @@ external/googleapis/update_libraries.sh "${library}"
119127Then run the micro-generator to create the scaffold and the C++ sources:
120128
121129``` shell
122- bazel_output_base=" $( bazel info output_base) "
123130bazel run \
124131 //generator:google-cloud-cpp-codegen -- \
125132 --protobuf_proto_path=" ${bazel_output_base} " /external/com_google_protobuf/src \
@@ -184,25 +191,14 @@ Otherwise, if you are generating an experimental library, add it to
184191` GOOGLE_CLOUD_CPP_EXPERIMENTAL_LIBRARIES ` and note in a comment when the library
185192was generated.
186193
187- ## Add the API baseline
188-
189- For new GA libraries you need to create the API baseline. You can leave this
190- running while you work on tweaks to the quickstart and documentation.
191-
192- ``` shell
193- env GOOGLE_CLOUD_CPP_CHECK_API=${library} ci/cloudbuild/build.sh -t check-api-pr
194- git add ci/abi-dumps
195- git commit -m" Add API baseline" ci/abi-dumps/
196- ```
197-
198194## Update the quickstart
199195
200196The generated quickstart will need some editing. Use a simple operation, maybe
201197an admin operation listing top-level resources, to demonstrate how to use the
202198API. Test your changes with:
203199
204200``` sh
205- gcloud services enable --project=cloud-cpp-testing-resources ${lbrary } .googleapis.com
201+ gcloud services enable --project=cloud-cpp-testing-resources " ${library } .googleapis.com"
206202bazel run -- //google/cloud/${library} /quickstart:quickstart $params
207203```
208204
@@ -211,6 +207,17 @@ arguments in the CI builds.
211207
212208- ` google/cloud/${library}/CMakeLists.txt `
213209
210+ ## Add the API baseline
211+
212+ For new GA libraries you need to create the API baseline. You can leave this
213+ running while you work on tweaks to the quickstart and documentation.
214+
215+ ``` shell
216+ env GOOGLE_CLOUD_CPP_CHECK_API=${library} ci/cloudbuild/build.sh -t check-api-pr
217+ git add ci/abi-dumps
218+ git commit -m" Add API baseline" ci/abi-dumps/
219+ ```
220+
214221## Update the README files
215222
216223The following files probably need some light copy-editing to read less like they
0 commit comments