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.
105 lines
2.6 KiB
Bash
Executable File
105 lines
2.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Build script for Claude-Flow Migration System
|
|
|
|
set -e
|
|
|
|
echo "🚀 Building Claude-Flow Migration System..."
|
|
|
|
# Check if we're in the right directory
|
|
if [ ! -f "package.json" ]; then
|
|
echo "❌ Error: package.json not found. Please run from project root."
|
|
exit 1
|
|
fi
|
|
|
|
# Clean previous builds
|
|
echo "🧹 Cleaning previous builds..."
|
|
rm -rf dist/migration
|
|
rm -rf src/migration/dist
|
|
|
|
# Install dependencies
|
|
echo "📦 Installing dependencies..."
|
|
npm install
|
|
|
|
# Build TypeScript
|
|
echo "🔨 Compiling TypeScript..."
|
|
cd src/migration
|
|
npm run build || {
|
|
echo "⚠️ TypeScript build with npm not available, using tsc directly..."
|
|
npx tsc
|
|
}
|
|
cd ../..
|
|
|
|
# Create distribution directory
|
|
echo "📁 Creating distribution structure..."
|
|
mkdir -p dist/migration
|
|
cp -r src/migration/dist/* dist/migration/
|
|
cp src/migration/package.json dist/migration/
|
|
cp src/migration/README.md dist/migration/
|
|
cp src/migration/migration-manifest.json dist/migration/
|
|
|
|
# Copy source templates for development
|
|
echo "📋 Copying templates..."
|
|
mkdir -p dist/migration/templates
|
|
cp -r .claude/ dist/migration/templates/claude || echo "⚠️ .claude folder not found, skipping..."
|
|
cp CLAUDE.md dist/migration/templates/ || echo "⚠️ CLAUDE.md not found, skipping..."
|
|
cp .roomodes dist/migration/templates/ || echo "⚠️ .roomodes not found, skipping..."
|
|
|
|
# Make executable
|
|
chmod +x dist/migration/index.js
|
|
|
|
# Create symlink for global usage
|
|
echo "🔗 Creating symlinks..."
|
|
mkdir -p bin
|
|
ln -sf ../dist/migration/index.js bin/claude-flow-migrate
|
|
|
|
# Run tests
|
|
echo "🧪 Running tests..."
|
|
cd src/migration
|
|
npm test || echo "⚠️ Tests failed or not configured"
|
|
cd ../..
|
|
|
|
# Create package info
|
|
echo "📄 Creating package information..."
|
|
cat > dist/migration/INSTALL.md << 'EOF'
|
|
# Claude-Flow Migration System Installation
|
|
|
|
## Quick Install
|
|
|
|
```bash
|
|
# From project root
|
|
npm install -g ./dist/migration
|
|
|
|
# Or use directly
|
|
./bin/claude-flow-migrate --help
|
|
```
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
# Analyze project
|
|
claude-flow-migrate analyze
|
|
|
|
# Migrate with selective strategy
|
|
claude-flow-migrate --strategy selective --preserve-custom
|
|
|
|
# Rollback if needed
|
|
claude-flow-migrate rollback
|
|
```
|
|
|
|
## Documentation
|
|
|
|
See README.md for complete documentation.
|
|
EOF
|
|
|
|
echo "✅ Build completed successfully!"
|
|
echo ""
|
|
echo "📋 Next steps:"
|
|
echo " 1. Test installation: ./bin/claude-flow-migrate --help"
|
|
echo " 2. Run on test project: ./bin/claude-flow-migrate analyze /path/to/project"
|
|
echo " 3. Create distribution: npm pack dist/migration"
|
|
echo ""
|
|
echo "📦 Built files:"
|
|
echo " - dist/migration/ - Complete migration system"
|
|
echo " - bin/claude-flow-migrate - Executable symlink"
|
|
echo "" |