move to new cspot

This commit is contained in:
philippe44
2023-03-25 16:48:41 -07:00
parent c712b78931
commit 008c36facf
2983 changed files with 465270 additions and 13569 deletions

View File

@@ -0,0 +1,7 @@
#!/bin/bash
sed -ir '/^\s*$/d' AUTHORS.txt # Remove empty lines
echo "New authors:"
git log --format='%aN <%aE>' | grep -vFf AUTHORS.txt | sort -u

View File

@@ -0,0 +1,44 @@
#!/bin/bash
# Run this script in the top nanopb directory to create a binary package
# for Linux users.
# Requires: protobuf, python-protobuf, pyinstaller
set -e
set -x
VERSION=`git describe --always`-linux-x86
DEST=dist/$VERSION
rm -rf $DEST
mkdir -p $DEST
# Export the files from newest commit
git archive HEAD | tar x -C $DEST
# Rebuild the Python .proto files and .pyc
( cd $DEST/generator; python3 nanopb_generator.py ||: )
# Package the Python libraries
( cd $DEST/generator; python3 -m PyInstaller nanopb_generator.py )
( cd $DEST/generator; python3 -m PyInstaller protoc )
mv $DEST/generator/dist/nanopb_generator $DEST/generator-bin
cp $DEST/generator/dist/protoc/protoc $DEST/generator-bin
# Include Google's descriptor.proto and nanopb.proto
cp -pr $(python3 -c 'import grpc_tools, os.path; print(os.path.dirname(grpc_tools.__file__))')/_proto $DEST/generator-bin/grpc_tools/
cp -pr $DEST/generator/proto $DEST/generator-bin/proto
# Remove temp files
rm -rf $DEST/generator/dist $DEST/generator/build $DEST/generator/nanopb_generator.spec
# Make the nanopb generator available as a protoc plugin
cp $DEST/generator-bin/nanopb_generator $DEST/generator-bin/protoc-gen-nanopb
# Remove debugging symbols to reduce size of package
( cd $DEST/generator-bin; strip *.so* )
# Tar it all up
( cd dist; tar -czf $VERSION.tar.gz $VERSION )

View File

@@ -0,0 +1,41 @@
#!/bin/bash
# Run this script in the top nanopb directory to create a binary package
# for Mac OS X users.
# Requires: protobuf, python-protobuf, pyinstaller
set -e
set -x
VERSION=`git describe --always`-macosx-x86
DEST=dist/$VERSION
rm -rf $DEST
mkdir -p $DEST
# Export the files from newest commit
git archive HEAD | tar x -C $DEST
# Rebuild the Python .proto files and .pyc
( cd $DEST/generator; python3 nanopb_generator.py ||: )
# Package the Python libraries
( cd $DEST/generator; python3 -m PyInstaller nanopb_generator.py )
( cd $DEST/generator; python3 -m PyInstaller protoc )
mv $DEST/generator/dist/nanopb_generator $DEST/generator-bin
cp $DEST/generator/dist/protoc/protoc $DEST/generator-bin
# Include Google's descriptor.proto and nanopb.proto
cp -pr $(python3 -c 'import grpc_tools, os.path; print(os.path.dirname(grpc_tools.__file__))')/_proto $DEST/generator-bin/grpc_tools/
cp -pr $DEST/generator/proto $DEST/generator-bin/proto
# Remove temp files
rm -rf $DEST/generator/dist $DEST/generator/build $DEST/generator/*.spec
# Make the nanopb generator available as a protoc plugin
cp $DEST/generator-bin/nanopb_generator $DEST/generator-bin/protoc-gen-nanopb
# Tar it all up
( cd dist; tar -czf $VERSION.tar.gz $VERSION )

View File

@@ -0,0 +1,44 @@
#!/bin/bash
# Run this script in the top nanopb directory to create a binary package
# for Windows users. This script is designed to run under MingW/MSYS bash
# and requires the following tools: git, make, zip, unix2dos
set -e
set -x
VERSION=`git describe --always`-windows-x86
DEST=dist/$VERSION
rm -rf $DEST
mkdir -p $DEST
# Export the files from newest commit
git archive HEAD | tar x -C $DEST
# Rebuild the Python .proto files and .pyc
( cd $DEST/generator; py -3 nanopb_generator.py ||: )
# Package the Python libraries
( cd $DEST/generator; py -3 -m PyInstaller nanopb_generator.py )
( cd $DEST/generator; py -3 -m PyInstaller protoc )
mv $DEST/generator/dist/nanopb_generator $DEST/generator-bin
cp $DEST/generator/dist/protoc/protoc.exe $DEST/generator-bin
# Include Google's descriptor.proto and nanopb.proto
cp -pr $(py -3 -c 'import grpc_tools, os.path; print(os.path.dirname(grpc_tools.__file__))')/_proto $DEST/generator-bin/grpc_tools/
cp -pr $DEST/generator/proto $DEST/generator-bin/proto
# Remove temp files
rm -rf $DEST/generator/dist $DEST/generator/build $DEST/generator/*.spec
# Make the nanopb generator available as a protoc plugin
cp $DEST/generator-bin/nanopb_generator.exe $DEST/generator-bin/protoc-gen-nanopb.exe
# Convert line breaks for convenience
find $DEST -name '*.c' -o -name '*.h' -o -name '*.txt' \
-o -name '*.proto' -o -name '*.py' -o -name '*.options' \
-exec sed -i 's/$/\r/' '{}' \;
# Zip it all up
( cd dist; rm -f $VERSION.zip; powershell "Compress-Archive $VERSION $VERSION.zip" )

View File

@@ -0,0 +1,17 @@
#!/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
sed -i -e 's/set(\s*nanopb_VERSION_STRING\s*[^)]*)/set(nanopb_VERSION_STRING '$1')/' CMakeLists.txt
VERSION_ONLY=$(echo $1 | sed 's/nanopb-//')
if [[ $1 != *dev ]]
then sed -i -e 's/"version":\s*"[^"]*"/"version": "'$VERSION_ONLY'"/' library.json
fi
sed -i -e 's/version =.*/version = "'$VERSION_ONLY'"/' conanfile.py
sed -i -e 's/^version =.*/version = "'$VERSION_ONLY'"/' extra/poetry/pyproject.toml