mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
- Implemented a validation script to check the installation of Claude optimized templates. - The script verifies the presence of required files, directory structure, and file content. - Added tests for command structure, version consistency, and installation timestamp. docs: Create comprehensive init command analysis report - Added an analysis report detailing the structure and functionality of the `claude-flow init` command. - Included sections on command flow, file structure, key functions, and SPARC integration. - Provided recommendations for optimization and next steps for further development. chore: Introduce init command file map for better organization - Created a JSON file mapping the structure and key components of the init command. - Included details on file locations, generated files, and key functions for easier reference. test: Develop extensive test suite for init command functionality - Established a comprehensive test suite covering unit, integration, and performance tests for the init command. - Included tests for batch initialization features, error handling, and environment configurations. - Ensured high test coverage and validation of all command functionalities. test: Add batch initialization tests for various scenarios - Implemented tests for batch initialization, including validation of options, project templates, and environment configurations. - Covered error handling and multi-environment initialization scenarios.
63 lines
1.9 KiB
Bash
Executable File
63 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
# Safe build script that preserves the existing binary
|
|
|
|
echo "🔨 Safe Build Script for Claude Flow"
|
|
echo "===================================="
|
|
|
|
# Create bin directory if it doesn't exist
|
|
mkdir -p bin
|
|
|
|
# Backup existing binary if it exists
|
|
if [ -f "bin/claude-flow" ]; then
|
|
echo "📦 Backing up existing binary..."
|
|
cp bin/claude-flow bin/claude-flow.backup
|
|
fi
|
|
|
|
# Set Deno path
|
|
export PATH="/home/codespace/.deno/bin:$PATH"
|
|
|
|
# Build to a temporary file first
|
|
echo "🏗️ Building Claude Flow..."
|
|
if deno compile --allow-all --no-check --output=bin/claude-flow.tmp src/cli/main.ts 2>/dev/null; then
|
|
echo "✅ Build successful!"
|
|
|
|
# Remove old binary and move new one
|
|
if [ -f "bin/claude-flow.tmp" ]; then
|
|
mv -f bin/claude-flow.tmp bin/claude-flow
|
|
chmod +x bin/claude-flow
|
|
echo "✅ Binary updated successfully!"
|
|
|
|
# Remove backup since build was successful
|
|
rm -f bin/claude-flow.backup
|
|
fi
|
|
else
|
|
echo "❌ Build failed!"
|
|
|
|
# Restore backup if build failed
|
|
if [ -f "bin/claude-flow.backup" ]; then
|
|
echo "🔄 Restoring backup..."
|
|
mv bin/claude-flow.backup bin/claude-flow
|
|
echo "✅ Backup restored!"
|
|
fi
|
|
|
|
exit 1
|
|
fi
|
|
|
|
# Build prompt copier CLI
|
|
echo "🏗️ Building Prompt Copier CLI..."
|
|
if deno compile --allow-all --no-check --output=bin/prompt-copier.tmp src/swarm/prompt-cli.ts 2>/dev/null; then
|
|
echo "✅ Prompt copier build successful!"
|
|
|
|
if [ -f "bin/prompt-copier.tmp" ]; then
|
|
mv -f bin/prompt-copier.tmp bin/prompt-copier
|
|
chmod +x bin/prompt-copier
|
|
echo "✅ Prompt copier binary updated successfully!"
|
|
fi
|
|
else
|
|
echo "⚠️ Prompt copier build failed - continuing without it"
|
|
fi
|
|
|
|
echo ""
|
|
echo "✅ Build complete!"
|
|
echo " Claude Flow binary: bin/claude-flow"
|
|
echo " Prompt Copier binary: bin/prompt-copier" |