Handle gpg signing better (#1123)
Instead of checking whether it was set previously, setting it to false, then setting it back to true if it was true before, just use the command-line argument in git to override the config for that command. Using a variable makes it pretty painless to do.
This commit is contained in:
parent
3eb1cdef72
commit
d45565f83b
10 changed files with 87 additions and 102 deletions
|
@ -6,7 +6,7 @@ basedir="$(cd "$1" && pwd -P)"
|
|||
workdir="$basedir/work"
|
||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||
decompiledir="$workdir/Minecraft/$minecraftversion"
|
||||
|
||||
gitcmd="git -c commit.gpgsign=false"
|
||||
|
||||
#
|
||||
# FUNCTIONS
|
||||
|
@ -15,7 +15,7 @@ decompiledir="$workdir/Minecraft/$minecraftversion"
|
|||
|
||||
updateTest() {
|
||||
paperstash
|
||||
git reset --hard origin/master
|
||||
$gitcmd reset --hard origin/master
|
||||
paperunstash
|
||||
}
|
||||
|
||||
|
@ -29,9 +29,9 @@ cd "$papertestdir"
|
|||
#
|
||||
|
||||
if [ ! -d .git ]; then
|
||||
git init
|
||||
git remote add origin ${PAPER_TEST_SKELETON:-https://github.com/PaperMC/PaperTestServer}
|
||||
git fetch origin
|
||||
$gitcmd init
|
||||
$gitcmd remote add origin ${PAPER_TEST_SKELETON:-https://github.com/PaperMC/PaperTestServer}
|
||||
$gitcmd fetch origin
|
||||
updateTest
|
||||
elif [ "$2" == "update" ] || [ "$3" == "update" ]; then
|
||||
updateTest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue