mirror of
https://github.com/firebase/nanopb
synced 2026-11-09 22:25:59 +05:45
style: revert shellcheck formatting in set_version.sh to minimize diff with upstream
This commit is contained in:
1 parent
b8f45c33bf
commit
c08d9ff7db
1 file changed
+5
-5
@@ -4,11 +4,11 @@
|
||||
# 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
|
||||
sed -i -e 's/set(\s*nanopb_VERSION_STRING\s*[^)]*)/set(nanopb_VERSION_STRING '"$1"')/' CMakeLists.txt
|
||||
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
|
||||
sed -i -e 's/set(\s*nanopb_VERSION_STRING\s*[^)]*)/set(nanopb_VERSION_STRING '$1')/' CMakeLists.txt
|
||||
|
||||
VERSION_ONLY="${1#nanopb-}"
|
||||
VERSION_ONLY=$(echo $1 | sed 's/nanopb-//')
|
||||
if [[ $1 != *dev ]]
|
||||
then sed -i -e 's/"version":\s*"[^"]*"/"version": "'"$VERSION_ONLY"'"/' library.json
|
||||
then sed -i -e 's/"version":\s*"[^"]*"/"version": "'$VERSION_ONLY'"/' library.json
|
||||
fi
|
||||
Reference in new issue
Block a user