Skip to content

Commit

Permalink
Fix generated go libs importpath (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenia-grunin authored Jan 24, 2024
1 parent 7ae7b3e commit 16c606a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 46 deletions.
18 changes: 9 additions & 9 deletions proto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ go_proto_library(
compilers = [
"@io_bazel_rules_go//proto:go_grpc",
],
importpath = "github.com/openconfig/attestz",
importpath = "github.com/openconfig/attestz/proto/common_definitions",
proto = ":common_definitions_proto",
)

Expand All @@ -37,17 +37,17 @@ go_proto_library(
compilers = [
"@io_bazel_rules_go//proto:go_grpc",
],
embed = [
importpath = "github.com/openconfig/attestz/proto/tpm_enrollz",
proto = ":tpm_enrollz_proto",
deps = [
":common_definitions_go_proto",
],
importpath = "github.com/openconfig/attestz",
proto = ":tpm_enrollz_proto",
)

go_library(
name = "tpm_enrollz_go",
embed = [":tpm_enrollz_go_proto"],
importpath = "github.com/openconfig/attestz",
importpath = "github.com/openconfig/attestz/proto/tpm_enrollz",
)

proto_library(
Expand All @@ -66,15 +66,15 @@ go_proto_library(
compilers = [
"@io_bazel_rules_go//proto:go_grpc",
],
embed = [
importpath = "github.com/openconfig/attestz/proto/tpm_attestz",
proto = ":tpm_attestz_proto",
deps = [
":common_definitions_go_proto",
],
importpath = "github.com/openconfig/attestz",
proto = ":tpm_attestz_proto",
)

go_library(
name = "tpm_attestz_go",
embed = [":tpm_attestz_go_proto"],
importpath = "github.com/openconfig/attestz",
importpath = "github.com/openconfig/attestz/proto/tpm_attestz",
)
38 changes: 19 additions & 19 deletions proto/tpm_attestz/tpm_attestz.pb.go

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

34 changes: 17 additions & 17 deletions proto/tpm_enrollz/tpm_enrollz.pb.go

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

2 changes: 1 addition & 1 deletion regenerate-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ copy_generated() {
# Bazel go_rules will create empty files containing "// +build ignore\n\npackage ignore"
# in the case where the protoc compiler doesn't generate any output. See:
# https:/bazelbuild/rules_go/blob/03a8b8e90eebe699d7/go/tools/builders/protoc.go#L190
for file in "${BASE}""/${3}""${proto}"_go_proto_/"${2}"/*.pb.go; do
for file in "${BASE}""/${3}""${proto}"_go_proto_/"${2}"/proto/"${pkg}"/*.pb.go; do
[[ $(head -n 1 "${file}") == "// +build ignore" ]] || cp -f "${file}" "${3}${pkg}/"
done
}
Expand Down

0 comments on commit 16c606a

Please sign in to comment.