#!/bin/bash

# Script pour migrer les anneaux business vers les anneaux classiques
# core -> adopt
# strategic -> trial
# support -> assess
# legacy -> hold

RADAR_DIR="radar-business/2025-01-15"

if [ ! -d "$RADAR_DIR" ]; then
  echo "Répertoire non trouvé: $RADAR_DIR"
  exit 1
fi

echo "Migration des anneaux dans $RADAR_DIR..."

for file in "$RADAR_DIR"/*.md; do
  if [ -f "$file" ]; then
    # Remplacer les anneaux
    sed -i 's/^ring: core$/ring: adopt/' "$file"
    sed -i 's/^ring: strategic$/ring: trial/' "$file"
    sed -i 's/^ring: support$/ring: assess/' "$file"
    sed -i 's/^ring: legacy$/ring: hold/' "$file"
    
    echo "Migré: $(basename "$file")"
  fi
done

echo "Migration terminée !"

