summaryrefslogtreecommitdiff
path: root/release-picker.sh
blob: 6ed6b37a79aa6b1ec170e64979fd54d03fc84f1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/zsh -e

commit_num=$1

echo "Starting at origin/master~${commit_num}..."

for x in {$commit_num..0} ; do
  echo "Checking origin/master~$x"
  git show origin/master~$x
  echo "Pick? (y/n)"
  read -sk pick
  if [[ "${pick:0:1}" = "y" ]] ; then
    git cherry-pick origin/master~$x
    if [[ $? != 0 ]] ; then
      echo "BAILing at origin/master~$x for conflict merge; resume at $(($x-1))"
      break
    fi
  else
    echo 
  fi
done

echo "Done!"