mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
feat: Add interactive version selection menu to installation scripts
Enhanced installation experience with interactive version selection: New Features: - Interactive menu during installation (no CLI parameters needed) - 3 options presented to users: 1. Latest Stable Release (Recommended) - Auto-detected from GitHub 2. Latest Development Version - Cutting-edge features 3. Specific Release Version - User enters desired tag - Clear descriptions for each option - Visual feedback with colored output - Default to stable release on Enter User Experience Improvements: - Simplified one-liner installation commands - Version selection happens during installation, not via parameters - Non-interactive mode still supported via --non-interactive flag - CLI parameters retained for advanced users (backward compatible) Installation Scripts: - install-remote.ps1: Added Show-VersionMenu() and Get-UserVersionChoice() - install-remote.sh: Added show_version_menu() and get_user_version_choice() Documentation Updates: - README.md: Simplified to single installation command with menu note - README_CN.md: Chinese version with menu explanation - Removed complex multi-section installation examples Example Flow: 1. User runs one-liner installation command 2. System checks prerequisites 3. Interactive menu appears with 3 choices 4. User selects version (or presses Enter for default) 5. Installation proceeds with selected version 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -338,18 +338,100 @@ function Wait-ForUserConfirmation {
|
||||
}
|
||||
}
|
||||
|
||||
function Show-VersionMenu {
|
||||
Write-Host ""
|
||||
Write-ColorOutput "====== Version Selection ======" $ColorInfo
|
||||
Write-Host "1) Latest Stable Release (Recommended)"
|
||||
Write-Host " - Production-ready version"
|
||||
Write-Host " - Auto-detected from GitHub releases"
|
||||
Write-Host ""
|
||||
Write-Host "2) Latest Development Version"
|
||||
Write-Host " - Cutting-edge features"
|
||||
Write-Host " - May contain experimental changes"
|
||||
Write-Host ""
|
||||
Write-Host "3) Specific Release Version"
|
||||
Write-Host " - Install a specific tagged release"
|
||||
Write-Host " - You will be asked for the version tag"
|
||||
Write-Host ""
|
||||
Write-ColorOutput "===============================" $ColorInfo
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
function Get-UserVersionChoice {
|
||||
if ($NonInteractive -or $Force) {
|
||||
# Non-interactive mode: use default stable version
|
||||
return @{
|
||||
Type = "stable"
|
||||
Tag = $Tag
|
||||
Branch = $Branch
|
||||
}
|
||||
}
|
||||
|
||||
Show-VersionMenu
|
||||
|
||||
$choice = Read-Host "Select version to install (1-3, default: 1)"
|
||||
|
||||
switch ($choice) {
|
||||
"2" {
|
||||
Write-ColorOutput "Selected: Latest Development Version" $ColorSuccess
|
||||
return @{
|
||||
Type = "latest"
|
||||
Tag = ""
|
||||
Branch = "main"
|
||||
}
|
||||
}
|
||||
"3" {
|
||||
Write-Host ""
|
||||
Write-ColorOutput "Available recent releases:" $ColorInfo
|
||||
Write-Host " v3.2.0, v3.1.0, v3.0.1, v3.0.0"
|
||||
Write-Host ""
|
||||
$tagInput = Read-Host "Enter version tag (e.g., v3.2.0)"
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($tagInput)) {
|
||||
Write-ColorOutput "No tag specified, using latest stable" $ColorWarning
|
||||
return @{
|
||||
Type = "stable"
|
||||
Tag = ""
|
||||
Branch = "main"
|
||||
}
|
||||
}
|
||||
|
||||
Write-ColorOutput "Selected: Specific Version $tagInput" $ColorSuccess
|
||||
return @{
|
||||
Type = "stable"
|
||||
Tag = $tagInput
|
||||
Branch = "main"
|
||||
}
|
||||
}
|
||||
default {
|
||||
Write-ColorOutput "Selected: Latest Stable Release (default)" $ColorSuccess
|
||||
return @{
|
||||
Type = "stable"
|
||||
Tag = ""
|
||||
Branch = "main"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Main {
|
||||
Show-Header
|
||||
|
||||
|
||||
Write-ColorOutput "This will download and install Claude Code Workflow System from GitHub." $ColorInfo
|
||||
Write-Host ""
|
||||
|
||||
|
||||
# Test prerequisites
|
||||
Write-ColorOutput "Checking system requirements..." $ColorInfo
|
||||
if (-not (Test-Prerequisites)) {
|
||||
Wait-ForUserConfirmation "System check failed! Press any key to exit..." -ExitAfter
|
||||
}
|
||||
|
||||
|
||||
# Get version choice from user (interactive menu)
|
||||
$versionChoice = Get-UserVersionChoice
|
||||
$script:Version = $versionChoice.Type
|
||||
$script:Tag = $versionChoice.Tag
|
||||
$script:Branch = $versionChoice.Branch
|
||||
|
||||
# Determine version information for display
|
||||
$versionInfo = switch ($Version) {
|
||||
"stable" {
|
||||
|
||||
Reference in New Issue
Block a user