fix: amélioration gestion erreurs Dockerfile avec if/then
- Utilisation de if/then au lieu de && pour mieux gérer les erreurs - Affichage du contenu de Navigation.tsx en cas d'échec - Affichage du contenu du dossier pages/ si team.tsx n'existe pas - Messages d'erreur plus clairs
This commit is contained in:
@@ -78,16 +78,32 @@ RUN mkdir -p .techradar/data && \
|
||||
RUN chmod +x scripts/create-team-page.sh && \
|
||||
echo "🚀 Exécution de create-team-page.sh..." && \
|
||||
echo "📋 État de Navigation.tsx AVANT modification:" && \
|
||||
grep -A 3 'href="/overview"' .techradar/src/components/Navigation/Navigation.tsx || echo "Pattern overview non trouvé" && \
|
||||
./scripts/create-team-page.sh && \
|
||||
(grep -A 3 'href="/overview"' .techradar/src/components/Navigation/Navigation.tsx || echo "Pattern overview non trouvé") && \
|
||||
echo "" && \
|
||||
(./scripts/create-team-page.sh || (echo "❌ Script create-team-page.sh a échoué" && exit 1)) && \
|
||||
echo "✅ Script create-team-page.sh terminé" && \
|
||||
echo "📋 État de Navigation.tsx APRÈS modification:" && \
|
||||
cat .techradar/src/components/Navigation/Navigation.tsx && \
|
||||
echo "" && \
|
||||
echo "📋 Vérification de Navigation.tsx:" && \
|
||||
grep -q 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx && echo "✅ Lien Équipe trouvé dans Navigation.tsx" || (echo "❌ Lien Équipe NON trouvé dans Navigation.tsx" && exit 1) && \
|
||||
if grep -q 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx; then \
|
||||
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:" && \
|
||||
test -f .techradar/src/pages/team.tsx && echo "✅ team.tsx existe" || (echo "❌ team.tsx n'existe pas" && exit 1)
|
||||
if [ -f .techradar/src/pages/team.tsx ]; then \
|
||||
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
|
||||
|
||||
# Builder l'application en mode production pour éviter Fast Refresh
|
||||
# Utiliser WORKDIR pour changer de répertoire de manière fiable
|
||||
|
||||
Reference in New Issue
Block a user