Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Z plays with the scripts and GPG some more
Dieser Commit ist enthalten in:
Ursprung
0084b02703
Commit
834b29c2dc
@ -22,13 +22,23 @@ function applyPatch {
|
|||||||
git clone "$what" "$target"
|
git clone "$what" "$target"
|
||||||
fi
|
fi
|
||||||
cd "$basedir/$target"
|
cd "$basedir/$target"
|
||||||
|
|
||||||
|
# Disable GPG signing before AM, slows things down and doesn't play nicely.
|
||||||
|
# There is also zero rational or logical reason to do so for these sub-repo AMs.
|
||||||
|
# Calm down kids, it's re-enabled (if needed) immediately after, pass or fail.
|
||||||
|
if [[ "$gpgsign" == "true" ]]; then
|
||||||
|
git config commit.gpgsign false
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Resetting $target to $what_name..."
|
echo "Resetting $target to $what_name..."
|
||||||
git remote rm upstream > /dev/null 2>&1
|
git remote rm upstream > /dev/null 2>&1
|
||||||
git remote add upstream "$basedir/$what" >/dev/null 2>&1
|
git remote add upstream "$basedir/$what" >/dev/null 2>&1
|
||||||
git checkout master 2>/dev/null || git checkout -b master
|
git checkout master 2>/dev/null || git checkout -b master
|
||||||
git fetch upstream >/dev/null 2>&1
|
git fetch upstream >/dev/null 2>&1
|
||||||
git reset --hard upstream/upstream
|
git reset --hard upstream/upstream
|
||||||
|
|
||||||
echo " Applying patches to $target..."
|
echo " Applying patches to $target..."
|
||||||
|
|
||||||
git am --abort >/dev/null 2>&1
|
git am --abort >/dev/null 2>&1
|
||||||
git am --3way --ignore-whitespace "$basedir/${what_name}-Patches/"*.patch
|
git am --3way --ignore-whitespace "$basedir/${what_name}-Patches/"*.patch
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
@ -43,18 +53,10 @@ function applyPatch {
|
|||||||
|
|
||||||
function enableCommitSigningIfNeeded {
|
function enableCommitSigningIfNeeded {
|
||||||
if [[ "$gpgsign" == "true" ]]; then
|
if [[ "$gpgsign" == "true" ]]; then
|
||||||
git config --global commit.gpgsign true
|
git config commit.gpgsign true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disable GPG signing before AM, slows things down and doesn't play nicely.
|
|
||||||
# There is also zero rational or logical reason to do so for these sub-repo AMs.
|
|
||||||
# Calm down kids, it's re-enabled (if needed) immediately after, pass or fail.
|
|
||||||
if [[ "$gpgsign" == "true" ]]; then
|
|
||||||
# Yes, this has to be global
|
|
||||||
git config --global commit.gpgsign false
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Move into spigot dir
|
# Move into spigot dir
|
||||||
cd "$workdir/Spigot"
|
cd "$workdir/Spigot"
|
||||||
basedir=$(pwd)
|
basedir=$(pwd)
|
||||||
|
@ -9,12 +9,19 @@ minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion |
|
|||||||
decompiledir="$workdir/$minecraftversion"
|
decompiledir="$workdir/$minecraftversion"
|
||||||
nms="$decompiledir/net/minecraft/server"
|
nms="$decompiledir/net/minecraft/server"
|
||||||
cb="src/main/java/net/minecraft/server"
|
cb="src/main/java/net/minecraft/server"
|
||||||
|
gpgsign=$(git config commit.gpgsign)
|
||||||
|
|
||||||
patch=$(which patch 2>/dev/null)
|
patch=$(which patch 2>/dev/null)
|
||||||
if [ "x$patch" == "x" ]; then
|
if [ "x$patch" == "x" ]; then
|
||||||
patch="$basedir/hctap.exe"
|
patch="$basedir/hctap.exe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function enableCommitSigningIfNeeded {
|
||||||
|
if [[ "$gpgsign" == "true" ]]; then
|
||||||
|
git config commit.gpgsign true
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
echo "Applying CraftBukkit patches to NMS..."
|
echo "Applying CraftBukkit patches to NMS..."
|
||||||
cd "$workdir/CraftBukkit"
|
cd "$workdir/CraftBukkit"
|
||||||
git checkout -B patched HEAD >/dev/null 2>&1
|
git checkout -B patched HEAD >/dev/null 2>&1
|
||||||
@ -35,6 +42,12 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
git add src >/dev/null 2>&1
|
git add src >/dev/null 2>&1
|
||||||
|
# We don't need to sign an automated commit
|
||||||
|
# All it does is make you input your key passphrase mid-patch
|
||||||
|
if [[ "$gpgsign" == "true" ]]; then
|
||||||
|
git config commit.gpgsign false
|
||||||
|
fi
|
||||||
git commit -m "CraftBukkit $ $(date)" >/dev/null 2>&1
|
git commit -m "CraftBukkit $ $(date)" >/dev/null 2>&1
|
||||||
|
enableCommitSigningIfNeeded
|
||||||
git checkout -f HEAD^ >/dev/null 2>&1
|
git checkout -f HEAD^ >/dev/null 2>&1
|
||||||
)
|
)
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren