mirror of
https://github.com/PaperMC/Paper.git
synced 2026-10-12 02:08:46 +00:00
+4








69ee95fa42
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues. Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong. This is now resolved. Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me. Please as always, backup your worlds and test before updating to 1.16.2! If you update to 1.16.2, there is no going back to an older build than this. --------------------------------- Co-authored-by: William Blake Galbreath <[email protected]> Co-authored-by: Mariell Hoversholm <[email protected]> Co-authored-by: krolik-exe <[email protected]> Co-authored-by: BillyGalbreath <[email protected]> Co-authored-by: stonar96 <[email protected]> Co-authored-by: Shane Freeder <[email protected]> Co-authored-by: Jason Penilla <[email protected]> Co-authored-by: Riley Park <[email protected]> Co-authored-by: Aurora <[email protected]> Co-authored-by: Nassim Jahnke <[email protected]> Co-authored-by: commandblockguy <[email protected]> Co-authored-by: DigitalRegent <[email protected]> Co-authored-by: ishland <[email protected]>
55 lines
1.6 KiB
Bash
Executable File
55 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
if [ -z "$1" ]; then
|
|
echo "$0 <prID>"
|
|
exit 1;
|
|
fi
|
|
repo=$(git remote get-url origin | sed -E 's/(.*@)?github.com(:|\/)//g' | sed 's/.git$//g')
|
|
data=$(curl -q https://api.github.com/repos/$repo/pulls/$1 2>/dev/null)
|
|
url=$(echo -e "$data" | grep --color=none ssh_url | head -n 1 |awk '{print $2}' | sed 's/"//g' | sed 's/,//g')
|
|
ref=$(echo -e "$data" | grep --color=none '"head":' -A 3 | grep ref | head -n 1 |awk '{print $2}' | sed 's/"//g' | sed 's/,//g')
|
|
prevbranch=$(\git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
|
|
branch="pr/$1"
|
|
up="pr-$1"
|
|
git remote remove $up 2>&1 1>/dev/null
|
|
git remote add -f $up $url
|
|
git branch -D $branch 2>/dev/null 1>&2
|
|
git checkout -b $branch $up/$ref 2>/dev/null|| true
|
|
echo "Merging $prevbranch into $branch"
|
|
git fetch origin
|
|
read -p "Press 'm' to merge, 'r' to rebase, or 'n' for nothing" -n 1 -r >&2
|
|
echo
|
|
if [[ "$REPLY" =~ ^[Mm]$ ]]; then
|
|
git merge origin/$prevbranch
|
|
elif [[ "$REPLY" =~ ^[Rr]$ ]]; then
|
|
git rebase master
|
|
fi
|
|
echo "Dropping to new shell, exit to delete the refs"
|
|
"${SHELL:-bash}" -i
|
|
|
|
read -p "Press 'p' to push. " -n 1 -r >&2
|
|
echo
|
|
pushed=0
|
|
if [[ "$REPLY" =~ ^[Pp]$ ]]; then
|
|
git push $up $branch:$ref -f
|
|
pushed=1
|
|
echo "Pushed" >&2
|
|
fi
|
|
|
|
echo "Deleting branch/upstream"
|
|
git checkout $prevbranch
|
|
if [[ "$pushed" == "1" ]]; then
|
|
read -p "Press 'm' to merge or 'r' to rebase merge " -n 1 -r >&2
|
|
if [[ "$REPLY" =~ ^[Mm]$ ]]; then
|
|
git merge $branch
|
|
fi
|
|
if [[ "$REPLY" =~ ^[Rr]$ ]]; then
|
|
git merge --ff-only $branch
|
|
fi
|
|
fi
|
|
|
|
git branch -D $branch
|
|
git remote remove $up
|
|
git gc
|
|
#git branch -u $up/$ref $branch
|
|
#git checkout $branch
|