Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Compute/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
deep-copy-regex:
- source: /google/cloud/compute/v1/.*-php/(.*)
dest: /owl-bot-staging/Compute/V1/$1
- source: /google/cloud/compute/(v1)/.*-php/(.*)
dest: /owl-bot-staging/Compute/$1/$2
api-name: Compute
2 changes: 1 addition & 1 deletion Compute/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"minimum-stability": "stable",
"require": {
"php": "^8.1",
"google/gax": "^1.36.0"
"google/gax": "^1.37.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
Expand Down
47 changes: 17 additions & 30 deletions Compute/owlbot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 Google LLC
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,9 @@

import logging
from pathlib import Path
import synthtool as s
import subprocess

import synthtool as s
from synthtool.languages import php
from synthtool import _tracked_paths

Expand All @@ -29,14 +30,7 @@
# Added so that we can pass copy_excludes in the owlbot_main() call
_tracked_paths.add(src)

# Exclude backwards-compatibility files for protos
php.owlbot_main(
src=src,
dest=dest,
copy_excludes=[
src / "*/proto/src/Google/Cloud/Compute/*/*_*.php"
]
)
php.owlbot_main(src=src, dest=dest)

# remove class_alias code
s.replace(
Expand All @@ -47,23 +41,16 @@
+ "\n",
'')


### [START] protoc backwards compatibility fixes

# roll back to private properties.
s.replace(
"src/V*/**/*.php",
r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$",
r"""Generated from protobuf field \1
*/
private $""")

### [END] protoc backwards compatibility fixes

# fix relative cloud.google.com links
s.replace(
"src/**/V*/**/*.php",
r"(.{0,})\]\((/.{0,})\)",
r"\1](https://cloud.google.com\2)"
)

# format generated clients
subprocess.run([
'npm',
'exec',
'--yes',
'--package=@prettier/plugin-php@^0.16',
'--',
'prettier',
'**/Client/*',
'--write',
'--parser=php',
'--single-quote',
'--print-width=120'])
8 changes: 4 additions & 4 deletions Compute/src/V1/AWSV4Signature.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Compute/src/V1/AbandonInstancesInstanceGroupManagerRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Compute/src/V1/AcceleratorConfig.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Compute/src/V1/AcceleratorType.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Compute/src/V1/AcceleratorTypeAggregatedList.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Compute/src/V1/AcceleratorTypeList.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 0 additions & 34 deletions Compute/src/V1/AcceleratorTypesClient.php

This file was deleted.

2 changes: 1 addition & 1 deletion Compute/src/V1/AcceleratorTypesScopedList.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading