fix: séparer script Python et exécution dans Dockerfile
- Création du script /tmp/add_team_link.py - Exécution du script dans un RUN séparé - Évite les erreurs de parsing Dockerfile
This commit is contained in:
@@ -107,10 +107,8 @@ export default TeamPage;
|
|||||||
EOF
|
EOF
|
||||||
RUN echo "✅ Page team.tsx créée"
|
RUN echo "✅ Page team.tsx créée"
|
||||||
|
|
||||||
# Modifier Navigation.tsx pour ajouter le lien Équipe
|
# Script Python pour ajouter le lien Équipe dans Navigation.tsx
|
||||||
RUN if ! grep -q 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx; then \
|
RUN cat > /tmp/add_team_link.py << 'PYEOF'
|
||||||
echo "➕ Ajout du lien Équipe dans Navigation.tsx..." && \
|
|
||||||
cat > /tmp/add_team_link.py << 'PYEOF'
|
|
||||||
import sys
|
import sys
|
||||||
f = ".techradar/src/components/Navigation/Navigation.tsx"
|
f = ".techradar/src/components/Navigation/Navigation.tsx"
|
||||||
with open(f, 'r') as file:
|
with open(f, 'r') as file:
|
||||||
@@ -141,6 +139,10 @@ else:
|
|||||||
print("❌ Impossible de trouver l'emplacement")
|
print("❌ Impossible de trouver l'emplacement")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
PYEOF
|
PYEOF
|
||||||
|
|
||||||
|
# Modifier Navigation.tsx pour ajouter le lien Équipe
|
||||||
|
RUN if ! grep -q 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx; then \
|
||||||
|
echo "➕ Ajout du lien Équipe dans Navigation.tsx..." && \
|
||||||
python3 /tmp/add_team_link.py && \
|
python3 /tmp/add_team_link.py && \
|
||||||
grep -q 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx && echo "✅ Lien Équipe ajouté" || (echo "❌ Lien Équipe non trouvé" && cat .techradar/src/components/Navigation/Navigation.tsx && exit 1); \
|
grep -q 'href="/team"' .techradar/src/components/Navigation/Navigation.tsx && echo "✅ Lien Équipe ajouté" || (echo "❌ Lien Équipe non trouvé" && cat .techradar/src/components/Navigation/Navigation.tsx && exit 1); \
|
||||||
else \
|
else \
|
||||||
|
|||||||
Reference in New Issue
Block a user