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
|
||||
RUN echo "✅ Page team.tsx créée"
|
||||
|
||||
# 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..." && \
|
||||
cat > /tmp/add_team_link.py << 'PYEOF'
|
||||
# Script Python pour ajouter le lien Équipe dans Navigation.tsx
|
||||
RUN cat > /tmp/add_team_link.py << 'PYEOF'
|
||||
import sys
|
||||
f = ".techradar/src/components/Navigation/Navigation.tsx"
|
||||
with open(f, 'r') as file:
|
||||
@@ -141,6 +139,10 @@ else:
|
||||
print("❌ Impossible de trouver l'emplacement")
|
||||
sys.exit(1)
|
||||
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 && \
|
||||
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 \
|
||||
|
||||
Reference in New Issue
Block a user