mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +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:
@@ -382,6 +382,70 @@ Repository: https://github.com/catlog22/Claude-Code-Workflow
|
||||
EOF
|
||||
}
|
||||
|
||||
function show_version_menu() {
|
||||
echo ""
|
||||
write_color "====== Version Selection ======" "$COLOR_INFO"
|
||||
echo "1) Latest Stable Release (Recommended)"
|
||||
echo " - Production-ready version"
|
||||
echo " - Auto-detected from GitHub releases"
|
||||
echo ""
|
||||
echo "2) Latest Development Version"
|
||||
echo " - Cutting-edge features"
|
||||
echo " - May contain experimental changes"
|
||||
echo ""
|
||||
echo "3) Specific Release Version"
|
||||
echo " - Install a specific tagged release"
|
||||
echo " - You will be asked for the version tag"
|
||||
echo ""
|
||||
write_color "===============================" "$COLOR_INFO"
|
||||
echo ""
|
||||
}
|
||||
|
||||
function get_user_version_choice() {
|
||||
if [ "$NON_INTERACTIVE" = true ] || [ "$FORCE" = true ]; then
|
||||
# Non-interactive mode: use default stable version
|
||||
echo "stable"
|
||||
return 0
|
||||
fi
|
||||
|
||||
show_version_menu
|
||||
|
||||
read -p "Select version to install (1-3, default: 1): " choice
|
||||
|
||||
case "$choice" in
|
||||
2)
|
||||
write_color "✓ Selected: Latest Development Version" "$COLOR_SUCCESS"
|
||||
VERSION_TYPE="latest"
|
||||
TAG_VERSION=""
|
||||
BRANCH="main"
|
||||
;;
|
||||
3)
|
||||
echo ""
|
||||
write_color "Available recent releases:" "$COLOR_INFO"
|
||||
echo " v3.2.0, v3.1.0, v3.0.1, v3.0.0"
|
||||
echo ""
|
||||
read -p "Enter version tag (e.g., v3.2.0): " tag_input
|
||||
|
||||
if [ -z "$tag_input" ]; then
|
||||
write_color "⚠ No tag specified, using latest stable" "$COLOR_WARNING"
|
||||
VERSION_TYPE="stable"
|
||||
TAG_VERSION=""
|
||||
else
|
||||
write_color "✓ Selected: Specific Version $tag_input" "$COLOR_SUCCESS"
|
||||
VERSION_TYPE="stable"
|
||||
TAG_VERSION="$tag_input"
|
||||
fi
|
||||
BRANCH="main"
|
||||
;;
|
||||
*)
|
||||
write_color "✓ Selected: Latest Stable Release (default)" "$COLOR_SUCCESS"
|
||||
VERSION_TYPE="stable"
|
||||
TAG_VERSION=""
|
||||
BRANCH="main"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function main() {
|
||||
show_header
|
||||
|
||||
@@ -395,6 +459,9 @@ function main() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get version choice from user (interactive menu)
|
||||
get_user_version_choice
|
||||
|
||||
# Determine version information for display
|
||||
local version_info=""
|
||||
case "$VERSION_TYPE" in
|
||||
|
||||
Reference in New Issue
Block a user