mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
- Add generate-all-bindings.sh script with logging support - Add GitHub Action to check if spine-c bindings are up-to-date - Update spine-flutter/generate-bindings.sh to use logging.sh - Action only runs on branches >= 4.3 (including beta versions) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
51 lines
970 B
Bash
Executable File
51 lines
970 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Get to the script's directory
|
|
cd "$(dirname "$0")"
|
|
|
|
# Source logging utilities
|
|
source ../formatters/logging/logging.sh
|
|
|
|
log_title "spine-dart bindings generation"
|
|
|
|
# Install dependencies if needed
|
|
if [ ! -d "codegen/node_modules" ]; then
|
|
log_action "Installing codegen dependencies"
|
|
if (cd codegen && npm install > /dev/null 2>&1); then
|
|
log_ok
|
|
else
|
|
log_fail
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Copy spine-c and spine-cpp sources
|
|
log_action "Setting up source files"
|
|
if ./setup.sh > /dev/null 2>&1; then
|
|
log_ok
|
|
else
|
|
log_fail
|
|
exit 1
|
|
fi
|
|
|
|
# Run the codegen
|
|
log_action "Generating Dart bindings"
|
|
if npx tsx codegen/src/index.ts > /dev/null 2>&1; then
|
|
log_ok
|
|
else
|
|
log_fail
|
|
exit 1
|
|
fi
|
|
|
|
# Build test spine_flutter shared library
|
|
log_action "Building test library"
|
|
if (cd test && ./build.sh > /dev/null 2>&1); then
|
|
log_ok
|
|
else
|
|
log_fail
|
|
exit 1
|
|
fi
|
|
|
|
log_summary "✓ Dart bindings generated successfully" |