Skip to content

Commit de48382

Browse files
committed
chore(java-storage): migrate owlbot.py
1 parent 9927028 commit de48382

1 file changed

Lines changed: 21 additions & 26 deletions

File tree

java-storage/owlbot.py

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,39 @@
1-
# Copyright 2018 Google LLC
1+
# Copyright 2026 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
66
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
7+
# https://www.apache.org/licenses/LICENSE-2.0
88
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""This script is used to synthesize generated parts of this library."""
16-
17-
import os
1815
import synthtool as s
19-
import synthtool.languages.java as java
16+
from synthtool.languages import java
2017

18+
'This script is used to synthesize generated parts of this library.'
19+
import os
2120

2221
for library in s.get_staging_dirs():
23-
# put any special-case replacements here
24-
if os.path.exists("owl-bot-staging/v2/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/gapic_metadata.json"):
25-
os.remove("owl-bot-staging/v2/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/gapic_metadata.json")
26-
s.move(library)
27-
22+
# put any special-case replacements here
23+
if os.path.exists('owl-bot-staging/v2/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/gapic_metadata.json'):
24+
os.remove('owl-bot-staging/v2/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/gapic_metadata.json')
25+
s.move(library)
2826
s.remove_staging_dirs()
29-
30-
java.common_templates(excludes=[
31-
'.kokoro/nightly/integration.cfg',
32-
'.kokoro/nightly/java11-integration.cfg',
33-
'.kokoro/nightly/samples.cfg',
34-
'.kokoro/presubmit/integration.cfg',
35-
'.kokoro/presubmit/samples.cfg',
36-
'.kokoro/presubmit/graalvm-native.cfg',
37-
'.kokoro/presubmit/graalvm-native-17.cfg',
38-
'.kokoro/requirements.in',
39-
'.kokoro/requirements.txt',
40-
'.github/trusted-contribution.yml',
41-
'.github/workflows/auto-release.yaml',
42-
'CONTRIBUTING.md',
43-
'renovate.json'
27+
java.common_templates(monorepo=True, excludes=[
28+
".github/*",
29+
".kokoro/*",
30+
"samples/*",
31+
"CODE_OF_CONDUCT.md",
32+
"CONTRIBUTING.md",
33+
"LICENSE",
34+
"SECURITY.md",
35+
"java.header",
36+
"license-checks.xml",
37+
"renovate.json",
38+
".gitignore"
4439
])

0 commit comments

Comments
 (0)