fix: simplification Dockerfile et suppression set -e du script
- Simplification de la gestion d'erreurs dans Dockerfile - Suppression de set -e dans le script pour mieux gérer les erreurs - Vérification que Navigation.tsx existe avant modification - Affichage du contenu en cas d'échec
This commit is contained in:
@@ -75,46 +75,20 @@ RUN mkdir -p .techradar/data && \
|
|||||||
test -f public/team.html && echo "✅ public/team.html existe" || echo "❌ public/team.html n'existe pas"
|
test -f public/team.html && echo "✅ public/team.html existe" || echo "❌ public/team.html n'existe pas"
|
||||||
|
|
||||||
# Créer la page Next.js /team et modifier Navigation
|
# Créer la page Next.js /team et modifier Navigation
|
||||||
# Désactiver temporairement set -e pour cette section pour voir toutes les erreurs
|
RUN chmod +x scripts/create-team-page.sh && \
|
||||||
RUN set +e && \
|
|
||||||
chmod +x scripts/create-team-page.sh && \
|
|
||||||
echo "🚀 Exécution de create-team-page.sh..." && \
|
echo "🚀 Exécution de create-team-page.sh..." && \
|
||||||
|
echo "📋 Vérification que Navigation.tsx existe:" && \
|
||||||
|
test -f .techradar/src/components/Navigation/Navigation.tsx && echo "✅ Navigation.tsx existe" || (echo "❌ Navigation.tsx n'existe pas" && ls -la .techradar/src/components/Navigation/ 2>/dev/null && exit 1) && \
|
||||||
echo "📋 État de Navigation.tsx AVANT modification:" && \
|
echo "📋 État de Navigation.tsx AVANT modification:" && \
|
||||||
(grep -A 3 'href="/overview"' .techradar/src/components/Navigation/Navigation.tsx || echo "Pattern overview non trouvé") && \
|
grep -A 3 'href="/overview"' .techradar/src/components/Navigation/Navigation.tsx || echo "Pattern overview non trouvé" && \
|
||||||
echo "" && \
|
echo "" && \
|
||||||
./scripts/create-team-page.sh; \
|
./scripts/create-team-page.sh || (echo "❌ Script create-team-page.sh a échoué" && cat .techradar/src/components/Navigation/Navigation.tsx && exit 1) && \
|
||||||
SCRIPT_EXIT=$?; \
|
|
||||||
echo "Script exit code: $SCRIPT_EXIT" && \
|
|
||||||
if [ $SCRIPT_EXIT -ne 0 ]; then \
|
|
||||||
echo "❌ Script create-team-page.sh a échoué avec code $SCRIPT_EXIT"; \
|
|
||||||
echo "📄 Contenu de Navigation.tsx après échec:"; \
|
|
||||||
cat .techradar/src/components/Navigation/Navigation.tsx 2>/dev/null || echo "Fichier non accessible"; \
|
|
||||||
exit 1; \
|
|
||||||
fi && \
|
|
||||||
echo "✅ Script create-team-page.sh terminé" && \
|
echo "✅ Script create-team-page.sh terminé" && \
|
||||||
echo "" && \
|
echo "" && \
|
||||||
echo "📋 Vérification de Navigation.tsx:" && \
|
echo "📋 Vérification de Navigation.tsx:" && \
|
||||||
if grep -q 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx; then \
|
grep -q 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx && echo "✅ Lien Équipe trouvé" || (echo "❌ Lien Équipe NON trouvé" && cat .techradar/src/components/Navigation/Navigation.tsx && exit 1) && \
|
||||||
echo "✅ Lien Équipe trouvé dans Navigation.tsx"; \
|
|
||||||
echo "📄 Extrait de Navigation.tsx avec le lien:"; \
|
|
||||||
grep -A 3 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx; \
|
|
||||||
else \
|
|
||||||
echo "❌ Lien Équipe NON trouvé dans Navigation.tsx"; \
|
|
||||||
echo "📄 Contenu complet de Navigation.tsx:"; \
|
|
||||||
cat .techradar/src/components/Navigation/Navigation.tsx; \
|
|
||||||
exit 1; \
|
|
||||||
fi && \
|
|
||||||
echo "" && \
|
|
||||||
echo "📋 Vérification de team.tsx:" && \
|
echo "📋 Vérification de team.tsx:" && \
|
||||||
if [ -f .techradar/src/pages/team.tsx ]; then \
|
test -f .techradar/src/pages/team.tsx && echo "✅ team.tsx existe" || (echo "❌ team.tsx n'existe pas" && ls -la .techradar/src/pages/ 2>/dev/null && exit 1)
|
||||||
echo "✅ team.tsx existe"; \
|
|
||||||
else \
|
|
||||||
echo "❌ team.tsx n'existe pas"; \
|
|
||||||
echo "📁 Contenu de .techradar/src/pages/:"; \
|
|
||||||
ls -la .techradar/src/pages/ 2>/dev/null || echo "Dossier pages/ non trouvé"; \
|
|
||||||
exit 1; \
|
|
||||||
fi && \
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Builder l'application en mode production pour éviter Fast Refresh
|
# Builder l'application en mode production pour éviter Fast Refresh
|
||||||
# Utiliser WORKDIR pour changer de répertoire de manière fiable
|
# Utiliser WORKDIR pour changer de répertoire de manière fiable
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Script pour créer la page Next.js /team et modifier Navigation
|
# Script pour créer la page Next.js /team et modifier Navigation
|
||||||
|
|
||||||
set -e # Arrêter en cas d'erreur
|
# Ne pas utiliser set -e car on veut gérer les erreurs manuellement
|
||||||
|
|
||||||
TECHRADAR_DIR=".techradar"
|
TECHRADAR_DIR=".techradar"
|
||||||
TEAM_PAGE="$TECHRADAR_DIR/src/pages/team.tsx"
|
TEAM_PAGE="$TECHRADAR_DIR/src/pages/team.tsx"
|
||||||
|
|||||||
Reference in New Issue
Block a user