From 2386f20286341dee4908f15cca979e0b99d9fe97 Mon Sep 17 00:00:00 2001 From: Pierrick Bouvier Date: Tue, 15 Oct 2024 13:16:29 -0700 Subject: [PATCH] wip --- push_new_series.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/push_new_series.sh b/push_new_series.sh index 374dd0ebadbd1..22d59ded95e76 100755 --- a/push_new_series.sh +++ b/push_new_series.sh @@ -77,9 +77,14 @@ do base_git_revision=$(git log -n1 --format=format:%H --before="$date" --first-parent upstream/master) echo $base_git_revision - git checkout $base_git_revision - b4 shazam $msg_id + git checkout "$base_git_revision" git branch -D $msg_id || true - git checkout -b $msg_id - git push -f --set-upstream origin $msg_id + if git checkout -b $msg_id; then + if ! b4 shazam $msg_id |& tee apply.log; then + git am --abort + git add apply.log + git commit -m 'am failed' + fi + git push --set-upstream origin $msg_id + fi done