|
1 | | -# Copyright 2018 Google LLC |
| 1 | +# Copyright 2022 Google LLC |
2 | 2 | # |
3 | | -# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# Licensed under the Apache License, Version 2.0 (the License); |
4 | 4 | # you may not use this file except in compliance with the License. |
5 | 5 | # You may obtain a copy of the License at |
6 | 6 | # |
7 | | -# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
8 | 8 | # |
9 | 9 | # Unless required by applicable law or agreed to in writing, software |
10 | 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
11 | 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | | - |
15 | | -"""This script is used to synthesize generated parts of this library.""" |
16 | | - |
17 | | -import os |
18 | | -import synthtool as s |
19 | 14 | import synthtool.languages.node as node |
20 | | - |
21 | | -node.owlbot_main( |
22 | | - staging_excludes=[ |
23 | | - ".eslintignore", ".prettierignore", "src/index.ts", "README.md", "package.json", |
24 | | - "system-test/fixtures/sample/src/index.js", |
25 | | - "system-test/fixtures/sample/src/index.ts"], |
26 | | - templates_excludes=[ |
27 | | - "src/index.ts", |
28 | | - ".eslintignore", |
29 | | - ".prettierignore", |
30 | | - "CONTRIBUTING.md", |
31 | | - ".github/auto-label.yaml", |
32 | | - ".github/release-please.yml", |
33 | | - ".github/CODEOWNERS", |
34 | | - ".github/sync-repo-settings.yaml" |
35 | | - ] |
36 | | -) |
37 | | - |
38 | | -# adjust .trampolinerc for environment tests |
39 | | -s.replace( |
40 | | - ".trampolinerc", |
41 | | - "required_envvars[^\)]*\)", |
42 | | - "required_envvars+=()" |
43 | | -) |
44 | | -s.replace( |
45 | | - ".trampolinerc", |
46 | | - "pass_down_envvars\+\=\(", |
47 | | - 'pass_down_envvars+=(\n "ENVIRONMENT"\n "RUNTIME"' |
48 | | -) |
49 | | - |
50 | | -# -------------------------------------------------------------------------- |
51 | | -# Modify test configs |
52 | | -# -------------------------------------------------------------------------- |
53 | | - |
54 | | -# add shared environment variables to test configs |
55 | | -s.move( |
56 | | - ".kokoro/common_env_vars.cfg", |
57 | | - ".kokoro/common.cfg", |
58 | | - merge=lambda src, dst, _, : f"{dst}\n{src}", |
59 | | -) |
60 | | - |
61 | | -for path, subdirs, files in os.walk(f".kokoro/continuous"): |
62 | | - for name in files: |
63 | | - if name == "common.cfg": |
64 | | - file_path = os.path.join(path, name) |
65 | | - s.move( |
66 | | - ".kokoro/common_env_vars.cfg", |
67 | | - file_path, |
68 | | - merge=lambda src, dst, _, : f"{dst}\n{src}", |
69 | | - ) |
| 15 | +node.owlbot_main(templates_excludes=[ |
| 16 | +'README.md' |
| 17 | +]) |
0 commit comments