diff options
author | Zach Brown <[email protected]> | 2016-04-13 22:39:54 -0500 |
---|---|---|
committer | Zach Brown <[email protected]> | 2016-04-13 22:39:54 -0500 |
commit | 9de6a01c183933f6532798e1583c5ce500d5c674 (patch) | |
tree | c31aa8117a36e422a37e48f7d4e9e7104866c3b1 /scripts | |
parent | d07eac31bc9dd1351dd7682a3539cf411daa3534 (diff) | |
download | Paper-9de6a01c183933f6532798e1583c5ce500d5c674.tar.gz Paper-9de6a01c183933f6532798e1583c5ce500d5c674.zip |
Revert "Z plays with the scripts and GPG some more"
This reverts commit 834b29c2dce3258bf3dbfe7132c07376e2e1ba43.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/applyPatches.sh | 26 | ||||
-rwxr-xr-x | scripts/init.sh | 13 |
2 files changed, 12 insertions, 27 deletions
diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh index 53f2c398bd..890412a4ff 100755 --- a/scripts/applyPatches.sh +++ b/scripts/applyPatches.sh @@ -22,23 +22,13 @@ function applyPatch { git clone "$what" "$target" fi 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..." git remote rm upstream > /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 fetch upstream >/dev/null 2>&1 git reset --hard upstream/upstream - echo " Applying patches to $target..." - git am --abort >/dev/null 2>&1 git am --3way --ignore-whitespace "$basedir/${what_name}-Patches/"*.patch if [ "$?" != "0" ]; then @@ -53,10 +43,18 @@ function applyPatch { function enableCommitSigningIfNeeded { if [[ "$gpgsign" == "true" ]]; then - git config commit.gpgsign true + git config --global commit.gpgsign true 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 cd "$workdir/Spigot" basedir=$(pwd) @@ -66,7 +64,7 @@ basedir=$(pwd) applyPatch ../CraftBukkit Spigot-Server patched ) || ( echo "Failed to apply Spigot Patches" - enableCommitSigningIfNeeded + enableCommitSigningIfNeeded exit 1 ) || exit 1 # Move out of Spigot @@ -82,10 +80,10 @@ cd "$basedir" ( applyPatch "work/Spigot/Spigot-API" Paper-API HEAD && applyPatch "work/Spigot/Spigot-Server" Paper-Server HEAD - enableCommitSigningIfNeeded + enableCommitSigningIfNeeded ) || ( echo "Failed to apply Paper Patches" - enableCommitSigningIfNeeded + enableCommitSigningIfNeeded exit 1 ) || exit 1 ) diff --git a/scripts/init.sh b/scripts/init.sh index a5760c4e9a..51110efb73 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -9,19 +9,12 @@ 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 @@ -42,12 +35,6 @@ 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 ) |