diff --git a/synth.py b/synth.py index e68036bbe5f..5799074cb78 100644 --- a/synth.py +++ b/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) \ No newline at end of file +# ---------------------------------------------------------------------------- +# 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)