Meshtastic-Apple/gen_protos.sh
Blake McAnally 0dedf94a98 General Project Cleanup
* Change SwiftLint from a "Run Script" build phase to a "Run Build Tool Plugins" build phase.
    * Developers no longer need to install and update SwiftLint manually. This can be useful when other projects are using different versions of SwiftLint.
    * [SwiftLint Docs](https://github.com/realm/SwiftLint?tab=readme-ov-file#xcode-projects)
    * [WWDC 22 - Meet Swift Package Plugins](https://developer.apple.com/videos/play/wwdc2022/110359/?time=162)
* Moved several scripts into a `.scripts` directory to keep the project root organized.
* Modified `.scripts/gen_protos.sh` to intelligently update git submodules and install `swift-protobuf` when it detects issues, reducing developer friction.
* Deleted the empty unit and UI testing targets. These can be added later as we write tests. someday 🙏
* Updated the README.md to reflect the above changes, and organized a few of the sections.
2024-06-03 19:58:18 -05:00

18 lines
550 B
Bash
Executable file

#!/bin/bash
# simple sanity checking for repo
if [ ! -d "./protobufs" ]; then
echo 'Please check out the protobuf submodule by running: `git submodule update --init`'
exit
fi
# simple sanity checking for executable
if [ ! -x "$(which protoc)" ]; then
echo 'Please install swift-protobuf by running: `brew install swift-protobuf`'
exit
fi
protoc --proto_path=./protobufs --swift_out=./Meshtastic/Protobufs ./protobufs/meshtastic/*.proto
echo "Done generating the swift files from the proto files."
echo "Build, test, and commit changes."