proto-socket/tools/generate_proto.sh
toki c384516b47 feat: implement new communication patterns and add cross-test support
- Add Transport class for unified communication layer
- Implement new communicator patterns
- Add VERSIONING.md for version management
- Add crosstest files for Dart/Go integration testing
- Update protocol documentation
- Add new skills and templates for AI-assisted development
- Various bug fixes and improvements to Dart implementation
2026-04-12 07:53:31 +09:00

30 lines
900 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
require_binary() {
local binary="$1"
local hint="$2"
if ! command -v "$binary" >/dev/null 2>&1; then
echo "Missing required binary: $binary" >&2
echo "$hint" >&2
exit 1
fi
}
require_binary protoc "Install Protocol Buffers compiler and ensure protoc is on PATH."
require_binary protoc-gen-dart "Install Dart plugin: dart pub global activate protoc_plugin, then add pub-cache/bin to PATH."
require_binary protoc-gen-go "Install Go plugin: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest, then add GOPATH/bin to PATH."
(
cd "$repo_root/dart"
protoc --dart_out=lib/src/packets lib/src/packets/message_common.proto
)
(
cd "$repo_root/go"
protoc --go_out=. --go_opt=paths=source_relative packets/message_common.proto
)
"$repo_root/tools/check_proto_sync.sh"