Skip to content

Commit 5821134

Browse files
authored
chore: add configurations in owlbot.py to copy gapic code (#1494)
1 parent 129455b commit 5821134

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ system_tests/local_test_setup
6262
# Make sure a generated file isn't accidentally committed.
6363
pylintrc
6464
pylintrc.test
65+
66+
# Docker files
67+
get-docker.sh

owlbot.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,33 @@
1414

1515
"""This script is used to synthesize generated parts of this library."""
1616

17+
import json
18+
1719
import synthtool as s
1820
from synthtool import gcp
1921
from synthtool.languages import python
2022

23+
# ----------------------------------------------------------------------------
24+
# Copy the generated client from the owl-bot staging directory
25+
# ----------------------------------------------------------------------------
26+
27+
# Load the default version defined in .repo-metadata.json.
28+
default_version = json.load(open(".repo-metadata.json", "rt")).get("default_version")
29+
30+
for library in s.get_staging_dirs(default_version):
31+
s.move(
32+
[library],
33+
excludes=[
34+
"**/gapic_version.py",
35+
"docs/**/*",
36+
"scripts/fixup*.py",
37+
"setup.py",
38+
"noxfile.py",
39+
"README.rst",
40+
],
41+
)
42+
s.remove_staging_dirs()
43+
2144
common = gcp.CommonTemplates()
2245

2346
# ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)