Skip to content

Commit

Permalink
feat: replace api-common-protos submodule with googleapis (#1395)
Browse files Browse the repository at this point in the history
  • Loading branch information
alicejli committed Dec 20, 2023
1 parent 1d6dde2 commit d72c489
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
@@ -1,3 +1,3 @@
[submodule "schema/api-common-protos"]
path = schema/api-common-protos
url = https://github.com/googleapis/api-common-protos.git
[submodule "googleapis"]
path = schema/googleapis
url = https://github.com/googleapis/googleapis.git
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -70,7 +70,7 @@ hold using this installation method._

## Schema
The schema of GAPIC Showcase API can be found in [schema/google/showcase/v1beta1](schema/google/showcase/v1beta1)
Its dependencies can be found in the [googleapis/api-common-protos](https://github.com/googleapis/api-common-protos)
Its dependencies can be found in the [googleapis/googleapis](https://github.com/googleapis/googleapis)
submodule.

## Development Environment
Expand All @@ -80,7 +80,7 @@ To set up this repository for local development, follow these steps:
or your OS package manager. This API utilizes `proto3_optional`, thus `v3.12.0`
is the minimum supported version of `protoc`.

1. Initialize the `api-common-protos` submodule:
1. Initialize the `googleapis` submodule:
```sh
git submodule update --init --recursive
```
Expand Down
1 change: 0 additions & 1 deletion schema/api-common-protos
Submodule api-common-protos deleted from e16c55
1 change: 1 addition & 0 deletions schema/googleapis
Submodule googleapis added at 5c1f64
6 changes: 3 additions & 3 deletions util/cmd/release/main.go
Expand Up @@ -65,7 +65,7 @@ func main() {
// Move schema files alongside their dependencies.
util.Execute("cp", "-rf", filepath.Join("schema", "google"), tmpProtoPath)

apiPath := filepath.Join("schema", "api-common-protos", "google", "api")
apiPath := filepath.Join("schema", "googleapis", "google", "api")
tmpAPIPath := filepath.Join(tmpProtoPath, "google", "api")
os.MkdirAll(tmpAPIPath, 0755)
util.Execute("cp", filepath.Join(apiPath, "annotations.proto"), tmpAPIPath)
Expand All @@ -75,12 +75,12 @@ func main() {
util.Execute("cp", filepath.Join(apiPath, "resource.proto"), tmpAPIPath)
util.Execute("cp", filepath.Join(apiPath, "routing.proto"), tmpAPIPath)

longrunningPath := filepath.Join("schema", "api-common-protos", "google", "longrunning")
longrunningPath := filepath.Join("schema", "googleapis", "google", "longrunning")
tmpLongrunningPath := filepath.Join(tmpProtoPath, "google", "longrunning")
os.MkdirAll(tmpLongrunningPath, 0755)
util.Execute("cp", filepath.Join(longrunningPath, "operations.proto"), tmpLongrunningPath)

rpcPath := filepath.Join("schema", "api-common-protos", "google", "rpc")
rpcPath := filepath.Join("schema", "googleapis", "google", "rpc")
tmpRPCPath := filepath.Join(tmpProtoPath, "google", "rpc")
os.MkdirAll(tmpRPCPath, 0755)
util.Execute("cp", filepath.Join(rpcPath, "status.proto"), tmpRPCPath)
Expand Down
2 changes: 1 addition & 1 deletion util/compile_protos.go
Expand Up @@ -55,7 +55,7 @@ func CompileProtos(version string) {
command := []string{
"protoc",
"--experimental_allow_proto3_optional",
"--proto_path=schema/api-common-protos",
"--proto_path=schema/googleapis",
"--proto_path=schema",
"--go_cli_out=" + filepath.Join("cmd", "gapic-showcase"),
"--go_cli_opt=root=gapic-showcase",
Expand Down

0 comments on commit d72c489

Please sign in to comment.