2021-11-29 21:11:27 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# simple sanity checking for repo
|
2024-03-28 21:31:37 -07:00
|
|
|
if [ ! -d "./protobufs" ]; then
|
2024-06-28 21:29:51 -05:00
|
|
|
git submodule update --init
|
|
|
|
|
else
|
2024-07-07 08:37:58 -05:00
|
|
|
git submodule update --remote --merge
|
2021-11-29 21:11:27 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# simple sanity checking for executable
|
2023-02-04 11:02:43 -08:00
|
|
|
if [ ! -x "$(which protoc)" ]; then
|
2024-06-28 21:29:51 -05:00
|
|
|
brew install swift-protobuf
|
2021-11-29 21:11:27 -08:00
|
|
|
fi
|
|
|
|
|
|
2024-06-07 22:09:20 -05:00
|
|
|
protoc --proto_path=./protobufs --swift_opt=Visibility=Public --swift_out=./MeshtasticProtobufs/Sources ./protobufs/meshtastic/*.proto
|
2023-01-18 11:33:45 -06:00
|
|
|
|
2021-11-29 21:11:27 -08:00
|
|
|
echo "Done generating the swift files from the proto files."
|
|
|
|
|
echo "Build, test, and commit changes."
|