From f880a09ae79c603dd8aa0dc54ec02298b202d50d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 21 Jun 2017 13:44:26 +0200 Subject: [PATCH] add protoc version and trezor-common revision to autogenerated files --- build_pb.sh | 5 +++++ trezorlib/messages_pb2.py | 2 ++ trezorlib/types_pb2.py | 2 ++ 3 files changed, 9 insertions(+) diff --git a/build_pb.sh b/build_pb.sh index 358ff7e537..b484cbfaca 100755 --- a/build_pb.sh +++ b/build_pb.sh @@ -9,3 +9,8 @@ done # hack to make output python 3 compatible sed -i 's/^import types_pb2/from . import types_pb2/g' $CURDIR/trezorlib/messages_pb2.py + +# add version +PROTOC_VER=$(protoc --version) +PROTOB_REV=$(git rev-parse HEAD) +sed -i "3i# $PROTOC_VER\n# trezor-common $PROTOB_REV" $CURDIR/trezorlib/*_pb2.py diff --git a/trezorlib/messages_pb2.py b/trezorlib/messages_pb2.py index 5ca2f9d0d7..fca18a4e48 100644 --- a/trezorlib/messages_pb2.py +++ b/trezorlib/messages_pb2.py @@ -1,5 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: messages.proto +# libprotoc 3.1.0 +# trezor-common 0001cb18c065d7f3aacd6f8d7c5be42cd7477a94 import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) diff --git a/trezorlib/types_pb2.py b/trezorlib/types_pb2.py index d311a2a319..04b14eeabe 100644 --- a/trezorlib/types_pb2.py +++ b/trezorlib/types_pb2.py @@ -1,5 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: types.proto +# libprotoc 3.1.0 +# trezor-common 0001cb18c065d7f3aacd6f8d7c5be42cd7477a94 import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))