Skip to content

feat: Update synth.py to copy discovery files from discovery-artifact-manager #1104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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)