From 08391f35eeeac9583c9ae5010e5e37ca2a5bc0a4 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Mon, 29 Oct 2012 19:15:34 +0200 Subject: Add nanopb version number to generated files. tools/set_version.sh is used to update the values. Update issue 36 Status: FixedInGit --- tools/set_version.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 tools/set_version.sh (limited to 'tools/set_version.sh') diff --git a/tools/set_version.sh b/tools/set_version.sh new file mode 100755 index 00000000..e15a859d --- /dev/null +++ b/tools/set_version.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Run this from the top directory of nanopb tree. +# e.g. user@localhost:~/nanopb$ tools/set_version.sh nanopb-0.1.9-dev +# It sets the version number in pb.h and generator/nanopb_generator.py. + +sed -i -e 's/nanopb_version\s*=\s*"[^"]*"/nanopb_version = "'$1'"/' generator/nanopb_generator.py +sed -i -e 's/#define\s*NANOPB_VERSION\s*.*/#define NANOPB_VERSION '$1'/' pb.h + + -- cgit 1.2.3-korg