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

Adds generated go client for oci-catalog that we'll use from syncer. #6618

Merged
merged 3 commits into from
Aug 15, 2023
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,13 @@ lint:
./script/linters/yaml-linter.sh
./script/linters/golang-linter.sh

.PHONY: default all test-all test test-dashboard fmt vet lint install-tools
buf-generate:
cd cmd/kubeapps-apis && buf generate
cd cmd/oci-catalog && buf generate
cd dashboard && yarn prettier

buf-mod-update:
buf mod update cmd/kubeapps-apis
buf mod update cmd/oci-catalog

.PHONY: default all buf-generate buf-mod-update test-all test test-dashboard fmt vet lint install-tools
14 changes: 14 additions & 0 deletions cmd/oci-catalog/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2021-2023 the Kubeapps contributors.
# SPDX-License-Identifier: Apache-2.0

---
version: v1beta1
plugins:
- name: go
out: gen
opt:
- module=github.com/vmware-tanzu/kubeapps/cmd/oci-catalog/gen
- name: go-grpc
out: gen
opt:
- module=github.com/vmware-tanzu/kubeapps/cmd/oci-catalog/gen
2 changes: 2 additions & 0 deletions cmd/oci-catalog/buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Generated by buf. DO NOT EDIT.
version: v1
15 changes: 15 additions & 0 deletions cmd/oci-catalog/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2023 the Kubeapps contributors.
# SPDX-License-Identifier: Apache-2.0

---
version: v1beta1
name: "buf.build/kubeapps/oci-catalog"
build:
roots:
- proto
lint:
use:
- DEFAULT
ignore_only:
RPC_RESPONSE_STANDARD_NAME:
- ocicatalog/v1alpha1/ocicatalog.proto
2 changes: 1 addition & 1 deletion cmd/oci-catalog/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::env;

fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::compile_protos("proto/ocicatalog.proto")?;
tonic_build::compile_protos("proto/ocicatalog/v1alpha1/ocicatalog.proto")?;

// If the binary is built with the ENV var "OCI_CATALOG_VERSION",
// the value will be available at buildime. Otherwise, it becomes "devel"
Expand Down
Loading
Loading