deploy/hotfix: ne pousser que les branches nommées (plus de co-push de master)
This commit is contained in:
+6
-6
@@ -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'."
|
||||
|
||||
Reference in New Issue
Block a user