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"
|
||||
|
||||
# Créer la page Next.js /team et modifier Navigation
|
||||
# Désactiver temporairement set -e pour cette section pour voir toutes les erreurs
|
||||
RUN set +e && \
|
||||
chmod +x scripts/create-team-page.sh && \
|
||||
RUN chmod +x scripts/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:" && \
|
||||
(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 "" && \
|
||||
./scripts/create-team-page.sh; \
|
||||
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 && \
|
||||
./scripts/create-team-page.sh || (echo "❌ Script create-team-page.sh a échoué" && cat .techradar/src/components/Navigation/Navigation.tsx && exit 1) && \
|
||||
echo "✅ Script create-team-page.sh terminé" && \
|
||||
echo "" && \
|
||||
echo "📋 Vérification de Navigation.tsx:" && \
|
||||
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 "" && \
|
||||
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 "📋 Vérification de team.tsx:" && \
|
||||
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 && \
|
||||
set -e
|
||||
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)
|
||||
|
||||
# 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