Skip to content

Commit e12046b

Browse files
tbpgcodyoss
andauthored
feat(internal/kokoro): add ability to regen all DocFX YAML (#3191)
Co-authored-by: Cody Oss <6331106+codyoss@users.noreply.github.com>
1 parent ba853fd commit e12046b

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

internal/kokoro/publish_docs.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ cd github/google-cloud-go/internal/godocfx
2727
go install
2828
cd -
2929

30-
cd $(mktemp -d)
31-
3230
export GOOGLE_APPLICATION_CREDENTIALS=$KOKORO_KEYSTORE_DIR/72523_go_integration_service_account
3331
# Keep GCLOUD_TESTS_GOLANG_PROJECT_ID in sync with continuous.sh.
3432
export GCLOUD_TESTS_GOLANG_PROJECT_ID=dulcet-port-762
35-
# Generate the YAML and a docs.metadata file.
36-
godocfx -project $GCLOUD_TESTS_GOLANG_PROJECT_ID -new-modules cloud.google.com/go
33+
34+
if [[ -n "$FORCE_GENERATE_ALL" ]]; then
35+
for m in $(find . -name go.mod -execdir go list -m \; | grep -v internal); do
36+
godocfx -out obj/api/$m@latest $m
37+
done
38+
else
39+
godocfx -project $GCLOUD_TESTS_GOLANG_PROJECT_ID -new-modules cloud.google.com/go
40+
fi
3741

3842
for f in $(find obj/api -name docs.metadata); do
3943
d=$(dirname $f)

0 commit comments

Comments
 (0)