Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace api-common-protos submodule with googleapis #1395

Merged
merged 7 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.19.2'
repo-token: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
alicejli marked this conversation as resolved.
Show resolved Hide resolved
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install external generators
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading