Files
CurrenciCombo/scripts/consolidate-branches.sh
defiQUG 3dc8592b83 docs: Update CHANGELOG and README for deployment models and troubleshooting
- Added multi-platform deployment architecture details (Web App, PWA, DApp) to README.md.
- Included comprehensive troubleshooting guides and fix scripts in README.md.
- Enhanced CHANGELOG.md with new features, fixes, and improvements, including TypeScript error resolutions and updated documentation structure.
- Revised development setup instructions in DEV_SETUP.md to reflect changes in script usage and environment variable setup.
2025-11-06 08:09:54 -08:00

51 lines
1.4 KiB
Bash

#!/bin/bash
# Branch Consolidation Script
# Consolidates all Dependabot branches into main
echo -e "\033[0;32mStarting branch consolidation...\033[0m"
# Fetch latest from remote
echo -e "\033[0;33mFetching latest from remote...\033[0m"
git fetch origin
# Get current branch
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo -e "Current branch: \033[0;36m$CURRENT_BRANCH\033[0m"
# Ensure we're on main
if [ "$CURRENT_BRANCH" != "main" ]; then
echo -e "\033[0;33mSwitching to main branch...\033[0m"
git checkout main
fi
# Get all Dependabot branches
DEPENDABOT_BRANCHES=$(git branch -r --list "origin/dependabot/*" | sed 's/^[[:space:]]*//')
echo -e "\n\033[0;36mFound Dependabot branches:\033[0m"
echo "$DEPENDABOT_BRANCHES" | while read -r branch; do
if [ -n "$branch" ]; then
echo -e " - $branch"
fi
done
echo -e "\n\033[0;33mNote: Dependabot branches should be merged via GitHub PRs\033[0m"
echo -e "\033[0;33mThis script prepares the consolidation plan.\033[0m"
# Create summary
BRANCH_COUNT=$(echo "$DEPENDABOT_BRANCHES" | grep -c "dependabot" || echo "0")
SUMMARY="# Branch Consolidation Summary
## Dependabot Branches Found
$BRANCH_COUNT branches
## Next Steps
1. Review Dependabot PRs on GitHub
2. Test each dependency update
3. Merge approved PRs
4. Clean up merged branches
"
echo -e "\n$SUMMARY"
echo -e "\n\033[0;32mConsolidation plan created!\033[0m"