Skip to content

Commit 56a1f79

Browse files
authored
chore: migrate to owl bot (#48)
* chore: migrate to owl bot * chore: copy files from googleapis-gen a21f1091413a260393548c1b2ac44b7347923f08 * chore: run the post processor
1 parent 738d0da commit 56a1f79

4 files changed

Lines changed: 40 additions & 152 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docker:
2+
digest: sha256:612842ba5ccf62b4e3983fe6dc453cf66883c74bc168aa62da7acaed1e2fdc93
3+
image: gcr.io/repo-automation-bots/owlbot-python:latest
4+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
docker:
16+
image: gcr.io/repo-automation-bots/owlbot-python:latest
17+
18+
deep-remove-regex:
19+
- /owl-bot-staging
20+
21+
deep-preserve-regex:
22+
- /owl-bot-staging/v1beta1
23+
24+
deep-copy-regex:
25+
- source: /google/cloud/recaptchaenterprise/(v.*)/.*-py/(.*)
26+
dest: /owl-bot-staging/$1/$2
27+
28+
begin-after-commit-hash: a21f1091413a260393548c1b2ac44b7347923f08
29+

packages/google-cloud-recaptcha-enterprise/synth.py renamed to packages/google-cloud-recaptcha-enterprise/owlbot.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,24 @@
1919
import synthtool.gcp as gcp
2020
from synthtool.languages import python
2121

22-
gapic = gcp.GAPICBazel()
2322
common = gcp.CommonTemplates()
2423

2524
# ----------------------------------------------------------------------------
2625
# Generate reCAPTCHA Enterprise GAPIC layer
2726
# ----------------------------------------------------------------------------
2827
versions = ["v1"]
2928

30-
for version in versions:
31-
library = gapic.py_library(
32-
service="recaptchaenterprise",
33-
version="v1",
34-
bazel_target=f"//google/cloud/recaptchaenterprise/{version}:recaptchaenterprise-{version}-py",
29+
for library in s.get_staging_dirs("v1"):
30+
# rename to google-cloud-recaptcha-enterprise
31+
s.replace(
32+
[library / "google/**/*.py", library / "tests/**/*.py"],
33+
"google-cloud-recaptchaenterprise",
34+
"google-cloud-recaptcha-enterprise",
3535
)
3636

3737
s.move(library, excludes=["setup.py", "README.rst", "docs/index.rst", "*.tar.gz"])
3838

39-
40-
# rename to google-cloud-recaptcha-enterprise
41-
s.replace(
42-
["google/**/*.py", "tests/**/*.py"],
43-
"google-cloud-recaptchaenterprise",
44-
"google-cloud-recaptcha-enterprise",
45-
)
39+
s.remove_staging_dirs()
4640

4741
# ----------------------------------------------------------------------------
4842
# Add templated files

packages/google-cloud-recaptcha-enterprise/synth.metadata

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)