refactor: comprehensive scripts directory reorganization by functionality
Scripts Directory Reorganization - Complete: ✅ FUNCTIONAL ORGANIZATION: Scripts sorted into 8 logical categories - github/: GitHub and Git operations (6 files) - sync/: Synchronization and data replication (4 files) - security/: Security and audit operations (2 files) - monitoring/: System and service monitoring (6 files) - maintenance/: System maintenance and cleanup (4 files) - deployment/: Deployment and provisioning (11 files) - testing/: Testing and quality assurance (13 files) - utils/: Utility scripts and helpers (47 files) ✅ ROOT DIRECTORY CLEANED: Only README.md remains in scripts root - scripts/README.md: Main documentation - scripts/SCRIPTS_ORGANIZATION.md: Complete organization guide - All functional scripts moved to appropriate subdirectories ✅ SCRIPTS CATEGORIZATION: 📁 GitHub Operations: PR resolution, repository management, Git workflows 📁 Synchronization: Bulk sync, fast sync, sync detection, SystemD sync 📁 Security: Security audits, monitoring, vulnerability scanning 📁 Monitoring: Health checks, log monitoring, network monitoring, production monitoring 📁 Maintenance: Cleanup operations, performance tuning, weekly maintenance 📁 Deployment: Release building, node provisioning, DAO deployment, production deployment 📁 Testing: E2E testing, workflow testing, QA cycles, service testing 📁 Utilities: System management, setup scripts, helpers, tools ✅ ORGANIZATION BENEFITS: - Better Navigation: Scripts grouped by functionality - Easier Maintenance: Related scripts grouped together - Scalable Structure: Easy to add new scripts to appropriate categories - Clear Documentation: Comprehensive organization guide with descriptions - Improved Workflow: Quick access to relevant scripts by category ✅ DOCUMENTATION ENHANCED: - SCRIPTS_ORGANIZATION.md: Complete directory structure and usage guide - Quick Reference: Common script usage examples - Script Descriptions: Purpose and functionality for each script - Maintenance Guidelines: How to keep organization current DIRECTORY STRUCTURE: 📁 scripts/ ├── README.md (Main documentation) ├── SCRIPTS_ORGANIZATION.md (Organization guide) ├── github/ (6 files - GitHub operations) ├── sync/ (4 files - Synchronization) ├── security/ (2 files - Security) ├── monitoring/ (6 files - Monitoring) ├── maintenance/ (4 files - Maintenance) ├── deployment/ (11 files - Deployment) ├── testing/ (13 files - Testing) ├── utils/ (47 files - Utilities) ├── ci/ (existing - CI/CD) ├── deployment/ (existing - legacy deployment) ├── development/ (existing - Development tools) ├── monitoring/ (existing - Legacy monitoring) ├── services/ (existing - Service management) ├── testing/ (existing - Legacy testing) ├── utils/ (existing - Legacy utilities) ├── workflow/ (existing - Workflow automation) └── workflow-openclaw/ (existing - OpenClaw workflows) RESULT: Successfully reorganized 27 unorganized scripts into 8 functional categories, creating a clean, maintainable, and well-documented scripts directory structure with comprehensive organization guide.
This commit is contained in:
70
scripts/deployment/build-release.sh
Executable file
70
scripts/deployment/build-release.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
# AITBC v0.2 Release Build Script
|
||||
# Builds CLI binaries for multiple platforms
|
||||
|
||||
set -e
|
||||
|
||||
VERSION="0.2.0"
|
||||
PROJECT_NAME="aitbc-cli"
|
||||
BUILD_DIR="dist/release"
|
||||
|
||||
echo "🚀 Building AITBC CLI v${VERSION} for release..."
|
||||
|
||||
# Clean previous builds
|
||||
rm -rf ${BUILD_DIR}
|
||||
mkdir -p ${BUILD_DIR}
|
||||
|
||||
# Build using PyInstaller for multiple platforms
|
||||
echo "📦 Building binaries..."
|
||||
|
||||
# Install PyInstaller if not available
|
||||
pip install pyinstaller
|
||||
|
||||
# Build for current platform
|
||||
pyinstaller --onefile \
|
||||
--name aitbc \
|
||||
--add-data "cli/aitbc_cli:aitbc_cli" \
|
||||
--hidden-import aitbc_cli \
|
||||
--hidden-import aitbc_cli.commands \
|
||||
--hidden-import aitbc_cli.utils \
|
||||
--distpath ${BUILD_DIR}/$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m) \
|
||||
cli/aitbc_cli/main.py
|
||||
|
||||
# Create release package
|
||||
echo "📋 Creating release package..."
|
||||
|
||||
# Create platform-specific packages
|
||||
cd ${BUILD_DIR}
|
||||
|
||||
# Linux package
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
mkdir -p linux-x86_64
|
||||
cp ../linux-x86_64/aitbc linux-x86_64/
|
||||
tar -czf aitbc-v${VERSION}-linux-x86_64.tar.gz linux-x86_64/
|
||||
fi
|
||||
|
||||
# macOS package
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
mkdir -p darwin-x86_64
|
||||
cp ../darwin-x86_64/aitbc darwin-x86_64/
|
||||
tar -czf aitbc-v${VERSION}-darwin-x86_64.tar.gz darwin-x86_64/
|
||||
fi
|
||||
|
||||
# Windows package (if on Windows with WSL)
|
||||
if command -v cmd.exe &> /dev/null; then
|
||||
mkdir -p windows-x86_64
|
||||
cp ../windows-x86_64/aitbc.exe windows-x86_64/
|
||||
zip -r aitbc-v${VERSION}-windows-x86_64.zip windows-x86_64/
|
||||
fi
|
||||
|
||||
echo "✅ Build complete!"
|
||||
echo "📁 Release files in: ${BUILD_DIR}"
|
||||
ls -la ${BUILD_DIR}/*.tar.gz ${BUILD_DIR}/*.zip 2>/dev/null || true
|
||||
|
||||
# Generate checksums
|
||||
echo "🔐 Generating checksums..."
|
||||
cd ${BUILD_DIR}
|
||||
sha256sum *.tar.gz *.zip 2>/dev/null > checksums.txt || true
|
||||
cat checksums.txt
|
||||
|
||||
echo "🎉 AITBC CLI v${VERSION} release ready!"
|
||||
Reference in New Issue
Block a user