3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00
Paper/scripts/upstreamCommit.sh
Jake Potrebic 52a60ad946
Updated Upstream (Bukkit/CraftBukkit) (#8172)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
23f557a0 SPIGOT-5380, SPIGOT-6958, PR-772: Add some missing entity API

CraftBukkit Changes:
fc3071161 SPIGOT-5380, SPIGOT-6958, PR-1085: Add some missing entity API
2022-07-22 11:18:00 -07:00

39 Zeilen
1.2 KiB
Bash
Ausführbare Datei

#!/usr/bin/env bash
(
set -e
PS1="$"
function changelog() {
base=$(git ls-tree HEAD $1 | cut -d' ' -f3 | cut -f1)
cd $1 && git log --oneline ${base}...HEAD | sed -E 's/(^[0-9a-f]{8,}( SPIGOT-[0-9]{1,4},?)* |Revert ")#([0-9]+)/\1PR-\3/'
}
bukkit=$(changelog work/Bukkit)
cb=$(changelog work/CraftBukkit)
spigot=$(changelog work/Spigot)
updated=""
logsuffix=""
if [ ! -z "$bukkit" ]; then
logsuffix="$logsuffix\n\nBukkit Changes:\n$bukkit"
updated="Bukkit"
fi
if [ ! -z "$cb" ]; then
logsuffix="$logsuffix\n\nCraftBukkit Changes:\n$cb"
if [ -z "$updated" ]; then updated="CraftBukkit"; else updated="$updated/CraftBukkit"; fi
fi
if [ ! -z "$spigot" ]; then
logsuffix="$logsuffix\n\nSpigot Changes:\n$spigot"
if [ -z "$updated" ]; then updated="Spigot"; else updated="$updated/Spigot"; fi
fi
disclaimer="Upstream has released updates that appear to apply and compile correctly.\nThis update has not been tested by PaperMC and as with ANY update, please do your own testing"
if [ ! -z "$1" ]; then
disclaimer="$@"
fi
log="${UP_LOG_PREFIX}Updated Upstream ($updated)\n\n${disclaimer}${logsuffix}"
echo -e "$log" | git commit -F -
) || exit 1