Files
Purpur/scripts/upstream.sh
William Blake Galbreath 3ea44ec8b2 Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
0dcce21f Merge remote-tracking branch 'origin/ver/1.16'
6ff90880 Merge branch 'ver/1.16'
81f6d51f [Auto] Updated Upstream (CraftBukkit)
2248fffc Clean up duplicated GameProfile Properties
49491f32 Fix Player Profile textures being duplicated - Fixes #3667
3fc98999 [1.15] Fix MobGoals#getAllGoals not actually returning all goals (#3671)
1d1c0561 Manually inline PooledBlockPosition#d(int, int, int)
5fc45f4d Revert recent changes around player skulls using user cache
a8ffecc7 Fix NPE and uuid lookup for player skulls
2020-07-04 18:24:43 -05:00

59 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# get base dir regardless of execution location
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
. "$(dirname "$SOURCE")/init.sh"
if [[ "$1" == up* ]]; then
(
cd "$basedir/Paper/" || exit
git fetch && git reset --hard origin/master
cd ../
git add Paper
)
fi
paperVer=$(gethead Paper)
cd "$basedir/Paper/" || exit
./paper patch
cd "Paper-Server" || exit
mcVer=$(mvn -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=minecraft_version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }')
basedir
. "$basedir"/scripts/importmcdev.sh
minecraftversion=$(grep <"$basedir"/Paper/work/BuildData/info.json minecraftVersion | cut -d '"' -f 4)
version=$(echo -e "Paper: $paperVer\nmc-dev:$importedmcdev")
tag="${minecraftversion}-${mcVer}-$(echo -e "$version" | shasum | awk '{print $1}')"
echo "$tag" >"$basedir"/current-paper
"$basedir"/scripts/generatesources.sh
cd Paper/ || exit
function tag() {
(
cd "$1" || exit
if [ "$2" == "1" ]; then
git tag -d "$tag" 2>/dev/null
fi
echo -e "$(date)\n\n$version" | git tag -a "$tag" -F - 2>/dev/null
)
}
echo "Tagging as $tag"
echo -e "$version"
forcetag=0
if [ "$(cat "$basedir"/current-paper)" != "$tag" ]; then
forcetag=1
fi
tag Paper-API $forcetag
tag Paper-Server $forcetag