bin/ 230 CLI tools (ask-*, br-*, agent-*, roadid, carpool) scripts/ 99 automation scripts fleet/ Node configs and deployment workers/ Cloudflare Worker sources (roadpay, road-search, squad webhooks) roadc/ RoadC programming language roadnet/ Mesh network (5 APs, WireGuard) operator/ Memory system scripts config/ System configs dotfiles/ Shell configs docs/ Documentation BlackRoad OS — Pave Tomorrow. RoadChain-SHA2048: d1a24f55318d338b RoadChain-Identity: alexa@sovereign RoadChain-Full: d1a24f55318d338b24b60bad7be39286379c76ae5470817482100cb0ddbbcb97e147d07ac7243da0a9f0363e4e5c833d612b9c0df3a3cd20802465420278ef74875a5b77f55af6fe42a931b8b635b3d0d0b6bde9abf33dc42eea52bc03c951406d8cbe49f1a3d29b26a94dade05e9477f34a7d4d4c6ec4005c3c2ac54e73a68440c512c8e83fd9b1fe234750b898ef8f4032c23db173961fe225e67a0432b5293a9714f76c5c57ed5fdf35b9fb40fd73c03ebf88b7253c6a0575f5afb6a6b49b3bda310602fb1ef676859962dad2aebbb2875814b30eee0a8ba195e482d4cbc91d8819e7f38f6db53e8063401649c77bb994371473cabfb917fb53e8cbe73d60
120 lines
2.7 KiB
Bash
Executable File
120 lines
2.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# BlackRoad Cross-Repo Sync CLI
|
|
# Version: 1.0.0
|
|
|
|
set -euo pipefail
|
|
|
|
SYNC_HOME="$HOME/.blackroad-sync"
|
|
DEPENDENCY_GRAPH="$SYNC_HOME/dependency-graph.json"
|
|
REPO_CACHE="$SYNC_HOME/repo-cache.json"
|
|
SYNC_HISTORY="$SYNC_HOME/sync-history.db"
|
|
|
|
# Colors
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
CYAN='\033[0;36m'
|
|
NC='\033[0m' # No Color
|
|
|
|
# Ensure directories exist
|
|
mkdir -p "$SYNC_HOME"
|
|
|
|
# Usage
|
|
usage() {
|
|
cat << EOF
|
|
${CYAN}br-sync${NC} - BlackRoad Cross-Repo Coordination Tool
|
|
|
|
${YELLOW}USAGE:${NC}
|
|
br-sync <command> [options]
|
|
|
|
${YELLOW}COMMANDS:${NC}
|
|
${GREEN}discover${NC} Discover all repos and build dependency graph
|
|
${GREEN}map${NC} Show dependency map
|
|
${GREEN}files${NC} Sync files across repos
|
|
${GREEN}version${NC} Coordinate version bumps
|
|
${GREEN}config${NC} Sync configuration
|
|
${GREEN}feature${NC} Multi-repo feature rollout
|
|
${GREEN}status${NC} Show sync status
|
|
${GREEN}history${NC} Show sync history
|
|
|
|
${YELLOW}EXAMPLES:${NC}
|
|
# Discover repos and build dependency graph
|
|
br-sync discover
|
|
|
|
# Show dependency map
|
|
br-sync map
|
|
|
|
# Sync GitHub workflows to all repos (dry-run)
|
|
br-sync files --pattern=".github/workflows/*" --dry-run
|
|
|
|
# Sync for real
|
|
br-sync files --pattern=".github/workflows/*"
|
|
|
|
# Bump versions across dependent repos
|
|
br-sync version --bump=minor --propagate
|
|
|
|
# Multi-repo feature rollout
|
|
br-sync feature --branch=feat/new-api --repos=roadapi,roadauth
|
|
|
|
${YELLOW}OPTIONS:${NC}
|
|
-h, --help Show this help message
|
|
-v, --version Show version
|
|
--dry-run Show what would happen without doing it
|
|
--force Force operation without confirmation
|
|
|
|
${YELLOW}DOCS:${NC}
|
|
~/.blackroad-sync/ - Sync data directory
|
|
|
|
EOF
|
|
exit 0
|
|
}
|
|
|
|
# Version
|
|
version() {
|
|
echo "br-sync version 1.0.0"
|
|
exit 0
|
|
}
|
|
|
|
# Command router
|
|
case "${1:-help}" in
|
|
discover)
|
|
shift
|
|
"$SYNC_HOME/scripts/discover.sh" "$@"
|
|
;;
|
|
map)
|
|
shift
|
|
"$SYNC_HOME/scripts/map.sh" "$@"
|
|
;;
|
|
files)
|
|
shift
|
|
"$SYNC_HOME/scripts/sync-files.sh" "$@"
|
|
;;
|
|
version)
|
|
shift
|
|
"$SYNC_HOME/scripts/sync-version.sh" "$@"
|
|
;;
|
|
config)
|
|
shift
|
|
"$SYNC_HOME/scripts/sync-config.sh" "$@"
|
|
;;
|
|
feature)
|
|
shift
|
|
"$SYNC_HOME/scripts/feature-rollout.sh" "$@"
|
|
;;
|
|
status)
|
|
shift
|
|
"$SYNC_HOME/scripts/status.sh" "$@"
|
|
;;
|
|
history)
|
|
shift
|
|
"$SYNC_HOME/scripts/history.sh" "$@"
|
|
;;
|
|
-v|--version)
|
|
version
|
|
;;
|
|
-h|--help|help|*)
|
|
usage
|
|
;;
|
|
esac
|