Skip to content

Commit af918e8

Browse files
authored
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 🦕
1 parent 0d561ef commit af918e8

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

synth.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
import synthtool as s
1616
from synthtool import gcp
17+
from synthtool.sources import git
18+
19+
DISCOVERY_ARTIFACT_MANAGER_REPO = "googleapis/discovery-artifact-manager"
1720

1821
common = gcp.CommonTemplates()
1922

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

32-
s.shell.run(["nox", "-s", "docs"], hide_output=False)
35+
# ----------------------------------------------------------------------------
36+
# Copy discoveries folder from discovery-artifact-manager repo
37+
# ----------------------------------------------------------------------------
38+
39+
discovery_artifact_manager_url = git.make_repo_clone_url(DISCOVERY_ARTIFACT_MANAGER_REPO)
40+
discovery_artifacts = git.clone(discovery_artifact_manager_url) / "discoveries"
41+
42+
excludes = [
43+
"**/BUILD.bazel",
44+
]
45+
s.copy(discovery_artifacts,
46+
"googleapiclient/discovery_cache/documents", excludes=excludes)
47+
48+
# ----------------------------------------------------------------------------
49+
# Generate docs
50+
# ----------------------------------------------------------------------------
51+
s.shell.run(["nox", "-s", "docs"], hide_output=False)

0 commit comments

Comments
 (0)