nushell-plugins/justfiles/full_distro.just
Jesús Pérez 41455c5b3e
Some checks failed
Build and Test / Validate Setup (push) Has been cancelled
Build and Test / Build (darwin-amd64) (push) Has been cancelled
Build and Test / Build (darwin-arm64) (push) Has been cancelled
Build and Test / Build (linux-amd64) (push) Has been cancelled
Build and Test / Build (windows-amd64) (push) Has been cancelled
Build and Test / Build (linux-arm64) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Package Results (push) Has been cancelled
Build and Test / Quality Gate (push) Has been cancelled
feat: Add complete Nushell full distribution system
## Major Features Added

- **Complete distribution infrastructure**: Build, package, and distribute Nushell binary alongside plugins
- **Zero-prerequisite installation**: Bootstrap installers work on fresh systems without Rust/Cargo/Nushell
- **Cross-platform support**: Linux, macOS, Windows (x86_64, ARM64)
- **Self-contained packages**: Everything needed for complete Nushell environment

## New Components

### Build System
- `scripts/build_nushell.nu` - Build nushell with all workspace plugins
- `scripts/collect_full_binaries.nu` - Collect nu binary + all plugins
- `justfiles/full_distro.just` - 40+ new recipes for distribution workflows

### Bootstrap Installers (Zero Prerequisites)
- `installers/bootstrap/install.sh` - Universal POSIX installer (900+ lines)
- `installers/bootstrap/install.ps1` - Windows PowerShell installer (800+ lines)
- Complete platform detection, PATH setup, plugin registration

### Distribution System
- `scripts/create_distribution_packages.nu` - Multi-platform package creator
- `scripts/install_full_nushell.nu` - Advanced nu-based installer
- `scripts/verify_installation.nu` - Installation verification suite
- `scripts/lib/common_lib.nu` - Shared utilities and logging

### Configuration Management
- `scripts/templates/default_config.nu` - Complete nushell configuration (500+ lines)
- `scripts/templates/default_env.nu` - Cross-platform environment setup
- `etc/distribution_config.toml` - Central distribution settings
- `scripts/templates/uninstall.sh` & `uninstall.ps1` - Clean removal

## Key Workflows

```bash
just build-full                # Build nushell + all plugins
just pack-full-all              # Create packages for all platforms
just verify-full                # Verify installation
just release-full-cross         # Complete cross-platform release
```

## Installation Experience

- One-liner: `curl -sSf https://your-url/install.sh | sh`
- Multiple modes: user, system, portable installation
- Automatic plugin registration with verification
- Professional uninstall capability

## Benefits

-  Solves bootstrap problem - no prerequisites needed
-  Production-ready distribution system
-  Complete cross-platform support
-  Professional installation experience
-  Integrates seamlessly with existing plugin workflows
-  Enterprise-grade verification and logging
2025-09-24 18:52:07 +01:00

326 lines
12 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Full Distribution Module - Complete Nushell Distribution
# Commands for building, collecting, and packaging complete Nushell distributions
# 🚀 NUSHELL BUILD COMMANDS
# Build nushell with all workspace plugins
[no-cd]
build-nushell:
@echo "🔨 Building Nushell with all workspace plugins..."
@{{justfile_directory()}}/scripts/run.sh build_nushell.nu --release
# Build nushell in debug mode
[no-cd]
build-nushell-debug:
@echo "🔨 Building Nushell (debug mode)..."
@{{justfile_directory()}}/scripts/run.sh build_nushell.nu
# Build nushell for specific target
[no-cd]
build-nushell-target TARGET:
@echo "🔨 Building Nushell for {{TARGET}}..."
@{{justfile_directory()}}/scripts/run.sh build_nushell.nu --release --target {{TARGET}}
# Build nushell with custom features
[no-cd]
build-nushell-features FEATURES:
@echo "🔨 Building Nushell with features: {{FEATURES}}..."
@{{justfile_directory()}}/scripts/run.sh build_nushell.nu --release --features {{FEATURES}}
# Build nushell with custom profile
[no-cd]
build-nushell-profile PROFILE:
@echo "🔨 Building Nushell with profile: {{PROFILE}}..."
@{{justfile_directory()}}/scripts/run.sh build_nushell.nu --profile {{PROFILE}}
# Check nushell build dependencies
[no-cd]
build-nushell-deps:
@echo "🔍 Checking Nushell build dependencies..."
@{{justfile_directory()}}/scripts/run.sh build_nushell.nu deps
# Show nushell build information
[no-cd]
build-nushell-info:
@echo " Nushell build information..."
@{{justfile_directory()}}/scripts/run.sh build_nushell.nu info
# 📦 FULL BUILD WORKFLOWS
# Build everything: nushell + all plugins
[no-cd]
build-full:
@echo "🚀 Building complete distribution (nushell + all plugins)..."
@just validate-nushell
@just build-nushell
@just build
# Build full release (optimized)
[no-cd]
build-full-release:
@echo "🚀 Building full release distribution..."
@just validate-nushell
@just build-nushell
@just build-release
# Build full distribution for specific target
[no-cd]
build-full-target TARGET:
@echo "🚀 Building full distribution for {{TARGET}}..."
@just validate-nushell
@just build-nushell-target {{TARGET}}
@just build-cross {{TARGET}}
# Build full distribution for all targets
[no-cd]
build-full-cross:
@echo "🌍 Building full distribution for all targets..."
@just validate-nushell
@just build-nushell
@just build-cross-all
# 📋 FULL COLLECTION COMMANDS
# Collect all binaries (nushell + plugins)
[no-cd]
collect-full:
@echo "📦 Collecting full binaries (nushell + plugins)..."
@{{justfile_directory()}}/scripts/run.sh collect_full_binaries.nu --release --force
# Collect full binaries in debug mode
[no-cd]
collect-full-debug:
@echo "📦 Collecting full binaries (debug mode)..."
@{{justfile_directory()}}/scripts/run.sh collect_full_binaries.nu --force
# List available full binaries
[no-cd]
collect-full-list:
@echo "📋 Available full binaries:"
@{{justfile_directory()}}/scripts/run.sh collect_full_binaries.nu --list
# List available platforms for full collection
[no-cd]
collect-full-platforms:
@echo "🌍 Available platforms for full collection:"
@{{justfile_directory()}}/scripts/run.sh collect_full_binaries.nu --list-platforms
# Collect full binaries for specific platform
[no-cd]
collect-full-platform PLATFORM:
@echo "📦 Collecting full binaries for {{PLATFORM}}..."
@{{justfile_directory()}}/scripts/run.sh collect_full_binaries.nu --platform {{PLATFORM}} --release --force
# Collect full binaries for all platforms
[no-cd]
collect-full-all:
@echo "🌍 Collecting full binaries for all platforms..."
@{{justfile_directory()}}/scripts/run.sh collect_full_binaries.nu --all-platforms --release --force
# Collect only plugins (exclude nushell)
[no-cd]
collect-plugins-only:
@echo "📦 Collecting plugins only..."
@{{justfile_directory()}}/scripts/run.sh collect_full_binaries.nu --release --force --include-nushell=false
# Collect full binaries with custom profile
[no-cd]
collect-full-profile PROFILE:
@echo "📦 Collecting full binaries with profile {{PROFILE}}..."
@{{justfile_directory()}}/scripts/run.sh collect_full_binaries.nu --profile {{PROFILE}} --force
# 📦 FULL PACKAGING COMMANDS
# Create full distribution package
[no-cd]
pack-full:
@echo "📦 Creating full distribution package..."
@{{justfile_directory()}}/scripts/run.sh create_distribution_packages.nu --force
# Package full distribution for specific platform
[no-cd]
pack-full-platform PLATFORM:
@echo "📦 Packaging full distribution for {{PLATFORM}}..."
@{{justfile_directory()}}/scripts/run.sh create_distribution_packages.nu --platform {{PLATFORM}} --force
# Package full distribution for all platforms
[no-cd]
pack-full-all:
@echo "🌍 Packaging full distribution for all platforms..."
@{{justfile_directory()}}/scripts/run.sh create_distribution_packages.nu --all-platforms --force
# Package full distribution with checksums
[no-cd]
pack-full-checksums:
@echo "🔐 Packaging full distribution with checksums..."
@{{justfile_directory()}}/scripts/run.sh create_distribution_packages.nu --all-platforms --checksums --force
# Package full distribution with bootstrap installers
[no-cd]
pack-full-bootstrap:
@echo "🚀 Packaging full distribution with bootstrap installers..."
@{{justfile_directory()}}/scripts/run.sh create_distribution_packages.nu --all-platforms --checksums --bootstrap --force
# Show what would be packaged
[no-cd]
pack-full-list:
@echo "📋 Files that would be packaged in full distribution:"
@{{justfile_directory()}}/scripts/run.sh create_distribution_packages.nu --list
# 🚀 FULL RELEASE WORKFLOWS
# Complete full release workflow
[no-cd]
release-full:
@echo "🚀 Running complete full release workflow..."
@just validate-nushell
@just build-full-release
@just collect-full
@just pack-full-checksums
# Cross-platform full release
[no-cd]
release-full-cross:
@echo "🌍 Running cross-platform full release workflow..."
@just validate-nushell
@just build-full-cross
@just collect-full-all
@just pack-full-bootstrap
# Quick full release for current platform
[no-cd]
release-full-quick:
@echo "⚡ Quick full release for current platform..."
@just validate-nushell
@just build-full-release
@just collect-full
@just pack-full
# Full release for specific target
[no-cd]
release-full-target TARGET:
@echo "🎯 Full release for {{TARGET}}..."
@just validate-nushell
@just build-full-target {{TARGET}}
@just collect-full-platform {{TARGET}}
@just pack-full-platform {{TARGET}}
# Development full release (debug mode)
[no-cd]
release-full-dev:
@echo "🛠️ Development full release..."
@just validate-nushell
@just build-full
@just collect-full-debug
@just pack-full
# 🔍 VERIFICATION COMMANDS
# Verify full installation
[no-cd]
verify-full:
@echo "🔍 Verifying full installation..."
@{{justfile_directory()}}/scripts/run.sh verify_installation.nu
# Test full installation locally
[no-cd]
test-install-full:
@echo "🧪 Testing full installation locally..."
@{{justfile_directory()}}/scripts/run.sh install_full_nushell.nu --test --verify
# Verify specific platform installation
[no-cd]
verify-full-platform PLATFORM:
@echo "🔍 Verifying {{PLATFORM}} installation..."
@{{justfile_directory()}}/scripts/run.sh verify_installation.nu --platform {{PLATFORM}}
# 📊 FULL DISTRIBUTION INFORMATION
# Show full distribution status
[no-cd]
full-status:
@echo "📊 Full Distribution Status"
@echo "=========================="
@echo ""
@echo "🔨 Build Status:"
@if [ -f "nushell/target/release/nu" ] || [ -f "nushell/target/release/nu.exe" ]; then \
echo " ✅ Nushell binary built"; \
else \
echo " ❌ Nushell binary not built"; \
fi
@echo ""
@echo "📦 Collection Status:"
@if [ -d "distribution" ]; then \
echo " ✅ Distribution directory exists"; \
echo " 📁 Platforms: $$(find distribution -maxdepth 1 -type d ! -name distribution | wc -l)"; \
else \
echo " ❌ Distribution directory not found"; \
fi
@echo ""
@echo "📦 Packaging Status:"
@if [ -d "bin_archives" ]; then \
echo " ✅ Package archives exist"; \
echo " 📦 Archives: $$(ls bin_archives/*.tar.gz bin_archives/*.zip 2>/dev/null | wc -l)"; \
else \
echo " ❌ No package archives found"; \
fi
# Show full distribution help
[no-cd]
full-help:
@echo "🚀 Full Distribution Module Help"
@echo "==============================="
@echo ""
@echo "NUSHELL BUILD:"
@echo " build-nushell - Build nushell with workspace plugins"
@echo " build-nushell-debug - Build nushell (debug mode)"
@echo " build-nushell-target TARGET - Build nushell for specific target"
@echo " build-nushell-features FEAT - Build nushell with custom features"
@echo " build-nushell-deps - Check nushell build dependencies"
@echo " build-nushell-info - Show nushell build information"
@echo ""
@echo "FULL BUILD WORKFLOWS:"
@echo " build-full - Build nushell + all plugins"
@echo " build-full-release - Build full release distribution"
@echo " build-full-target TARGET - Build full distribution for target"
@echo " build-full-cross - Build full distribution for all targets"
@echo ""
@echo "FULL COLLECTION:"
@echo " collect-full - Collect all binaries (nushell + plugins)"
@echo " collect-full-debug - Collect full binaries (debug mode)"
@echo " collect-full-list - List available full binaries"
@echo " collect-full-platforms - List available platforms"
@echo " collect-full-platform PLAT - Collect for specific platform"
@echo " collect-full-all - Collect for all platforms"
@echo " collect-plugins-only - Collect only plugins (no nushell)"
@echo ""
@echo "FULL PACKAGING:"
@echo " pack-full - Create full distribution package"
@echo " pack-full-platform PLATFORM - Package for specific platform"
@echo " pack-full-all - Package for all platforms"
@echo " pack-full-checksums - Package with checksums"
@echo " pack-full-bootstrap - Package with bootstrap installers"
@echo " pack-full-list - Show what would be packaged"
@echo ""
@echo "FULL RELEASE WORKFLOWS:"
@echo " release-full - Complete full release workflow"
@echo " release-full-cross - Cross-platform full release"
@echo " release-full-quick - Quick full release (current platform)"
@echo " release-full-target TARGET - Full release for specific target"
@echo " release-full-dev - Development full release (debug)"
@echo ""
@echo "VERIFICATION:"
@echo " verify-full - Verify full installation"
@echo " test-install-full - Test full installation locally"
@echo " verify-full-platform PLAT - Verify platform installation"
@echo ""
@echo "INFORMATION:"
@echo " full-status - Show full distribution status"
@echo " full-help - Show this help"
@echo ""
@echo "EXAMPLES:"
@echo " just build-full-release"
@echo " just collect-full-all"
@echo " just pack-full-bootstrap"
@echo " just release-full-cross"
@echo " just verify-full"