Self-update


πŸ“ Description

The self-update command automatically updates the GEXD CLI tool to the latest available version from pub.dev. It ensures you have access to the newest features, bug fixes, and improvements.


βš™οΈ Usage

gexd self-update [options]

πŸ“‹ Basic Examples:

# Update to latest version
gexd self-update

# Check for updates without installing
gexd self-update --dry-run

# Force update (skip confirmations)
gexd self-update --force

# Update to specific version
gexd self-update --version 1.2.3

# Verbose update with detailed output
gexd self-update --verbose

🚩 Flags

Flag
Description

--dry-run

Check for updates without installing

--force

Force update without confirmation prompts

--version <version>

Update to specific version

--verbose

Show detailed update process

--pre-release

Include pre-release versions


🎯 Update Process:

  1. πŸ” Version Check - Compares current vs latest version

  2. πŸ“‹ Release Notes - Shows what's new in the update

  3. βœ… Confirmation - Asks for user confirmation

  4. ⬇️ Download - Downloads new version from pub.dev

  5. πŸ”„ Installation - Replaces current installation

  6. βœ… Verification - Confirms successful update


πŸ“Š Update Information:

Current Version:

# Check your current version
gexd --version

# Check current vs latest
gexd self-update --dry-run

Version History:

# See what's new in latest version
gexd self-update --verbose

# Update to specific older version
gexd self-update --version 0.9.5

βœ… What It Does:

  1. πŸ“‘ Fetch Latest Info - Checks pub.dev for new releases

  2. πŸ“‹ Show Changelog - Displays release notes and changes

  3. πŸ”’ Backup Current - Saves current version for rollback

  4. ⬇️ Download Update - Retrieves new version files

  5. πŸ”„ Replace Installation - Updates the CLI tool

  6. πŸ§ͺ Test Installation - Verifies the update worked


πŸ›‘οΈ Safety Features:

  • πŸ’Ύ Automatic Backup: Current version is backed up

  • βœ… Version Verification: Confirms download integrity

  • πŸ”„ Rollback Option: Can restore previous version if needed

  • ⚠️ Compatibility Check: Ensures update is compatible

  • πŸ”’ Permission Handling: Manages system permissions properly


πŸ”§ Troubleshooting:

Permission Issues:

# If permission denied on macOS/Linux
sudo gexd self-update

# Alternative: Update via pub (Dart)
dart pub global activate gexd

# Alternative: Update via pub (Flutter)
flutter pub global activate gexd

Network Issues:

# Try with verbose logging
gexd self-update --verbose

# Check connectivity
ping pub.dev

Rollback:

# If update causes issues, rollback
gexd self-update --version [previous_version]

# Or reinstall via pub (Dart)
dart pub global deactivate gexd
dart pub global activate gexd [version]

# Or reinstall via pub (Flutter)
flutter pub global deactivate gexd
flutter pub global activate gexd [version]

πŸ“… Update Schedule:

  • πŸ”„ Check Frequency: Checks for updates on each major command

  • πŸ“’ Notifications: Shows update availability messages

  • ⏰ Auto-Check: Automatically checks weekly

  • πŸ”• Silent Mode: Can disable update notifications


⚠️ Notes:

  • 🌐 Internet Required: Needs internet connection

  • πŸ“¦ Pub.dev Dependency: Updates from pub.dev registry

  • πŸ”’ Admin Rights: May require elevated permissions

  • πŸ’Ύ Data Preservation: Your projects and settings are preserved


Generated automatically by gexd_doc

Last updated