Skip to content

Commit

Permalink
fix: Don't include generator test protos in the API index.
Browse files Browse the repository at this point in the history
Keep `googleapis` and `googleapis-api-index-generator` separate when generating the API index.

The index generator recurses down the directory structure... which means that test files in the generator's `test` directory are ending up being treated as APIs with a directory path of `gen/test/...`

Fixes googleapis/googleapis-api-index-generator#18

Committer: @jskeet
PiperOrigin-RevId: 387371705
  • Loading branch information
Google APIs authored and Copybara-Service committed Jul 28, 2021
1 parent fa5dd8d commit baba739
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/generate_api_index.yaml
Expand Up @@ -11,6 +11,8 @@ jobs:
uses: actions/setup-dotnet@v1.8.0
- name: Checkout googleapis (this repository)
uses: actions/checkout@v2
with:
path: googleapis
- name: Checkout index generator
uses: actions/checkout@v2
with:
Expand All @@ -19,10 +21,11 @@ jobs:
- name: Generate API index
run: |
gen/scripts/generate-schema.sh
gen/scripts/generate-index.sh $PWD
cp gen/tmp/api-index-v1.json $PWD
gen/scripts/generate-index.sh $PWD/googleapis
cp gen/tmp/api-index-v1.json $PWD/googleapis
- name: Commit API index
run: |
cd googleapis
[[ ! $(git diff --exit-code api-index-v1.json) ]] && echo "Nothing to commit." && exit 0
git config user.name "Google APIs"
git add api-index-v1.json
Expand Down

0 comments on commit baba739

Please sign in to comment.