Skip to content

Commit b8e0213

Browse files
author
Takashi Matsuo
authored
chore: migrate AnalyticsAdmin to owlbot (#4757)
1 parent 3e9797a commit b8e0213

File tree

3 files changed

+11
-61
lines changed

3 files changed

+11
-61
lines changed

.OwlBot.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
deep-copy-regex:
2+
- source: /google/analytics/admin/v1alpha/.*-php/(.*)
3+
dest: /owl-bot-staging/AnalyticsAdmin/v1alpha/$1

synth.py renamed to owlbot.py

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,21 @@
1414

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

17-
import synthtool as s
18-
import synthtool.gcp as gcp
1917
import logging
18+
from pathlib import Path
19+
import subprocess
2020

21-
logging.basicConfig(level=logging.DEBUG)
21+
import synthtool as s
22+
from synthtool.languages import php
2223

23-
gapic = gcp.GAPICBazel()
24-
common = gcp.CommonTemplates()
24+
logging.basicConfig(level=logging.DEBUG)
2525

26-
library = gapic.php_library(
27-
service='analytics-admin',
28-
version='v1alpha',
29-
bazel_target='//google/analytics/admin/v1alpha:google-analytics-admin-v1alpha-php',
30-
)
26+
src = Path(f"../{php.STAGING_DIR}/AnalyticsAdmin").resolve()
27+
dest = Path().resolve()
3128

32-
# copy all src including partial veneer classes
33-
s.move(library / 'src')
29+
php.owlbot_main(src=src, dest=dest)
3430

35-
# copy proto files to src also
36-
s.move(library / 'proto/src/Google/Analytics/Admin', 'src/')
37-
s.move(library / 'tests/')
3831

39-
# copy GPBMetadata file to metadata
40-
s.move(library / 'proto/src/GPBMetadata/Google/Analytics/Admin', 'metadata/')
4132

4233
# document and utilize apiEndpoint instead of serviceAddress
4334
s.replace(
@@ -57,20 +48,6 @@
5748
r"\$transportConfig, and any \$serviceAddress",
5849
r"$transportConfig, and any `$apiEndpoint`")
5950

60-
# fix year
61-
s.replace(
62-
'**/Gapic/*GapicClient.php',
63-
r'Copyright \d{4}',
64-
'Copyright 2020')
65-
s.replace(
66-
'**/V1alpha/*Client.php',
67-
r'Copyright \d{4}',
68-
'Copyright 2020')
69-
s.replace(
70-
'tests/**/V1alpha/*Test.php',
71-
r'Copyright \d{4}',
72-
'Copyright 2020')
73-
7451
# Change the wording for the deprecation warning.
7552
s.replace(
7653
'src/*/*_*.php',

synth.metadata

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

0 commit comments

Comments
 (0)