diff --git a/.gitignore b/.gitignore index d083ea1dd..6f2ab1aff 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,6 @@ system_tests/local_test_setup # Make sure a generated file isn't accidentally committed. pylintrc pylintrc.test + +# Docker files +get-docker.sh diff --git a/owlbot.py b/owlbot.py index 08ddbb8fc..ba3f32df3 100644 --- a/owlbot.py +++ b/owlbot.py @@ -14,10 +14,33 @@ """This script is used to synthesize generated parts of this library.""" +import json + import synthtool as s from synthtool import gcp from synthtool.languages import python +# ---------------------------------------------------------------------------- +# Copy the generated client from the owl-bot staging directory +# ---------------------------------------------------------------------------- + +# Load the default version defined in .repo-metadata.json. +default_version = json.load(open(".repo-metadata.json", "rt")).get("default_version") + +for library in s.get_staging_dirs(default_version): + s.move( + [library], + excludes=[ + "**/gapic_version.py", + "docs/**/*", + "scripts/fixup*.py", + "setup.py", + "noxfile.py", + "README.rst", + ], + ) +s.remove_staging_dirs() + common = gcp.CommonTemplates() # ----------------------------------------------------------------------------