Z plays with the scripts and GPG some more

This commit is contained in:
Zach Brown 2016-04-13 22:05:59 -05:00
parent 0084b02703
commit 834b29c2dc
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76
2 changed files with 27 additions and 12 deletions

View file

@ -9,12 +9,19 @@ minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion |
decompiledir="$workdir/$minecraftversion"
nms="$decompiledir/net/minecraft/server"
cb="src/main/java/net/minecraft/server"
gpgsign=$(git config commit.gpgsign)
patch=$(which patch 2>/dev/null)
if [ "x$patch" == "x" ]; then
patch="$basedir/hctap.exe"
fi
function enableCommitSigningIfNeeded {
if [[ "$gpgsign" == "true" ]]; then
git config commit.gpgsign true
fi
}
echo "Applying CraftBukkit patches to NMS..."
cd "$workdir/CraftBukkit"
git checkout -B patched HEAD >/dev/null 2>&1
@ -35,6 +42,12 @@ do
done
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
enableCommitSigningIfNeeded
git checkout -f HEAD^ >/dev/null 2>&1
)