Skip to content

Commit

Permalink
fix: versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
alpancs committed Sep 7, 2021
1 parent 8f2e818 commit 1130134
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion content_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (b *contentBuilder) build(protoFile *descriptorpb.FileDescriptorProto) (str
compVersion := b.request.GetCompilerVersion()
fmt.Fprintf(b.output, "// Code generated by protoc-gen-pubsub-schema. DO NOT EDIT.\n")
fmt.Fprintf(b.output, "// versions:\n")
fmt.Fprintf(b.output, "// protoc-gen-pubsub-schema v1.5.0\n")
fmt.Fprintf(b.output, "// protoc-gen-pubsub-schema v1.4.3\n")
fmt.Fprintf(b.output, "// protoc v%d.%d.%d%s\n", compVersion.GetMajor(), compVersion.GetMinor(), compVersion.GetPatch(), compVersion.GetSuffix())
fmt.Fprintf(b.output, "// source: %s\n\n", protoFile.GetName())
fmt.Fprintf(b.output, "syntax = \"%s\";\n", b.schemaSyntax)
Expand Down
2 changes: 1 addition & 1 deletion example/user_add_comment.pps
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-pubsub-schema. DO NOT EDIT.
// versions:
// protoc-gen-pubsub-schema v1.5.0
// protoc-gen-pubsub-schema v1.4.3
// protoc v3.17.3
// source: example/user_add_comment.proto

Expand Down
2 changes: 1 addition & 1 deletion test/user_add_comment.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file: {
name: "example/user_add_comment.pps"
content: "// Code generated by protoc-gen-pubsub-schema. DO NOT EDIT.\n// versions:\n// protoc-gen-pubsub-schema v1.5.0\n// protoc v3.17.3\n// source: example/user_add_comment.proto\n\nsyntax = \"proto2\";\n\nmessage UserAddComment {\n required User user = 1;\n required string comment = 2;\n repeated ExampleCommonLabel labels = 3;\n required GoogleProtobufTimestamp timestamp = 101;\n\n message User {\n required string first_name = 1;\n optional string last_name = 2;\n optional bytes avatar = 3;\n optional Location location = 4;\n optional GoogleProtobufTimestamp created_at = 5;\n optional GoogleProtobufTimestamp updated_at = 6;\n\n message Location {\n required double longitude = 1;\n required double latitude = 2;\n }\n\n message GoogleProtobufTimestamp {\n optional int64 seconds = 1;\n optional int32 nanos = 2;\n }\n }\n\n message ExampleCommonLabel {\n optional string key = 1;\n optional string value = 2;\n }\n\n message GoogleProtobufTimestamp {\n optional int64 seconds = 1;\n optional int32 nanos = 2;\n }\n}\n"
content: "// Code generated by protoc-gen-pubsub-schema. DO NOT EDIT.\n// versions:\n// protoc-gen-pubsub-schema v1.4.3\n// protoc v3.17.3\n// source: example/user_add_comment.proto\n\nsyntax = \"proto2\";\n\nmessage UserAddComment {\n required User user = 1;\n required string comment = 2;\n repeated ExampleCommonLabel labels = 3;\n required GoogleProtobufTimestamp timestamp = 101;\n\n message User {\n required string first_name = 1;\n optional string last_name = 2;\n optional bytes avatar = 3;\n optional Location location = 4;\n optional GoogleProtobufTimestamp created_at = 5;\n optional GoogleProtobufTimestamp updated_at = 6;\n\n message Location {\n required double longitude = 1;\n required double latitude = 2;\n }\n\n message GoogleProtobufTimestamp {\n optional int64 seconds = 1;\n optional int32 nanos = 2;\n }\n }\n\n message ExampleCommonLabel {\n optional string key = 1;\n optional string value = 2;\n }\n\n message GoogleProtobufTimestamp {\n optional int64 seconds = 1;\n optional int32 nanos = 2;\n }\n}\n"
}

0 comments on commit 1130134

Please sign in to comment.