From b7991a0eaa0fb0582ca0927205b9dd61a9461c69 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 20 Feb 2019 19:31:30 +0000 Subject: [PATCH] Misc script fixes Also, grab upstreamCommit --- scripts/applyPatches.sh | 0 scripts/build.sh | 6 +++++- scripts/edit.sh | 0 scripts/mergeUpstream.sh | 0 scripts/rebuildPatches.sh | 0 scripts/upstreamCommit.sh | 28 ++++++++++++++++++++++++++++ travertine | 0 7 files changed, 33 insertions(+), 1 deletion(-) mode change 100644 => 100755 scripts/applyPatches.sh mode change 100644 => 100755 scripts/build.sh mode change 100644 => 100755 scripts/edit.sh mode change 100644 => 100755 scripts/mergeUpstream.sh mode change 100644 => 100755 scripts/rebuildPatches.sh create mode 100755 scripts/upstreamCommit.sh mode change 100644 => 100755 travertine diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh old mode 100644 new mode 100755 diff --git a/scripts/build.sh b/scripts/build.sh old mode 100644 new mode 100755 index 5afe191..683134a --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,3 +1,7 @@ #!/usr/bin/env bash -git submodule update --recursive --init && ./scripts/applyPatches.sh && pushd Travertine-Proxy && mvn clean package && popd +git submodule update --recursive --init && ./scripts/applyPatches.sh +if [ "$1" == "--jar" ]; then + pushd Travertine-Proxy + mvn clean package +fi diff --git a/scripts/edit.sh b/scripts/edit.sh old mode 100644 new mode 100755 diff --git a/scripts/mergeUpstream.sh b/scripts/mergeUpstream.sh old mode 100644 new mode 100755 diff --git a/scripts/rebuildPatches.sh b/scripts/rebuildPatches.sh old mode 100644 new mode 100755 diff --git a/scripts/upstreamCommit.sh b/scripts/upstreamCommit.sh new file mode 100755 index 0000000..aa7c1a9 --- /dev/null +++ b/scripts/upstreamCommit.sh @@ -0,0 +1,28 @@ +#!/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 +} +waterfall=$(changelog Waterfall) + +updated="" +logsuffix="" +if [ ! -z "$waterfall" ]; then + logsuffix="$logsuffix\n\nWaterfall Changes:\n$waterfall" + if [ -z "$updated" ]; then updated="Waterfall"; else updated="$updated/Waterfall"; fi +fi +disclaimer="Upstream has released updates that appears 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 diff --git a/travertine b/travertine old mode 100644 new mode 100755