deploy/hotfix: ne pousser que les branches nommées (plus de co-push de master)

This commit is contained in:
2026-09-07 15:15:36 +02:00
parent 44dcd0192f
commit b4164187d3
3 changed files with 25 additions and 19 deletions
+6 -6
View File
@@ -55,7 +55,7 @@ fi
# ---- Confirmation ----------------------------------------------------------
list="${BRANCHES[*]}"
if [ "$PUSH" = true ]; then push_line="OUI vers '$REMOTE' ($list + '$SOURCE', atomique)"; else push_line="NON (désactivé)"; fi
if [ "$PUSH" = true ]; then push_line="OUI vers '$REMOTE' ($list, atomique)"; else push_line="NON (désactivé)"; fi
[ "$dirty" = 1 ] && commit_line="commit sur '$SOURCE' : \"$MSG\"" || commit_line="aucun commit (arbre propre)"
confirm " • $commit_line
• merge '$SOURCE' → $list
@@ -106,14 +106,14 @@ echo "✓ Local OK : $list."
# ---- Push : dernière étape, atomique, jamais forcé -------------------------
if [ "$PUSH" = true ]; then
echo "→ Vérification du push (dry-run)…"
git push --atomic --dry-run "$REMOTE" "${BRANCHES[@]}" "$SOURCE" \
git push --atomic --dry-run "$REMOTE" "${BRANCHES[@]}" \
|| { echo "✗ Push rejeté au dry-run (non fast-forward ?). RIEN poussé. Local conservé." >&2; exit 1; }
echo "→ Push atomique ($list + '$SOURCE') → '$REMOTE'…"
git push --atomic "$REMOTE" "${BRANCHES[@]}" "$SOURCE" \
echo "→ Push atomique ($list) → '$REMOTE'…"
git push --atomic "$REMOTE" "${BRANCHES[@]}" \
|| { echo "✗ Échec du push. RIEN poussé (atomique). Local conservé." >&2; \
echo " Relance : git push --atomic $REMOTE $list $SOURCE" >&2; exit 1; }
echo " Relance : git push --atomic $REMOTE $list" >&2; exit 1; }
echo "✓ Poussé sur '$REMOTE'."
else
echo "→ (push désactivé) aurait fait : git push --atomic $REMOTE $list $SOURCE"
echo "→ (push désactivé) aurait fait : git push --atomic $REMOTE $list"
fi
echo "✓ Terminé. Tu es sur '$SOURCE'."