Skip to content
Permalink
Browse files

feat: Update synth.py to copy discovery files from discovery-artifact…

…-manager (#1104)

Update synth.py to copy discovery files from discovery-artifact-manager

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-api-python-client/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)

Closes #1103 🦕
  • Loading branch information
parthea committed Nov 26, 2020
1 parent 0d561ef commit af918e8ef422438aaca0c468de8b3b2c184d884e
Showing with 20 additions and 1 deletion.
  1. +20 −1 synth.py
@@ -14,6 +14,9 @@

import synthtool as s
from synthtool import gcp
from synthtool.sources import git

DISCOVERY_ARTIFACT_MANAGER_REPO = "googleapis/discovery-artifact-manager"

common = gcp.CommonTemplates()

@@ -29,4 +32,20 @@
# Also move issue templates
s.move(templated_files / '.github')

s.shell.run(["nox", "-s", "docs"], hide_output=False)
# ----------------------------------------------------------------------------
# Copy discoveries folder from discovery-artifact-manager repo
# ----------------------------------------------------------------------------

discovery_artifact_manager_url = git.make_repo_clone_url(DISCOVERY_ARTIFACT_MANAGER_REPO)
discovery_artifacts = git.clone(discovery_artifact_manager_url) / "discoveries"

excludes = [
"**/BUILD.bazel",
]
s.copy(discovery_artifacts,
"googleapiclient/discovery_cache/documents", excludes=excludes)

# ----------------------------------------------------------------------------
# Generate docs
# ----------------------------------------------------------------------------
s.shell.run(["nox", "-s", "docs"], hide_output=False)

0 comments on commit af918e8

Please sign in to comment.