2020-09-27 00:48:46 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2022-07-04 20:44:00 +00:00
|
|
|
# Prepare
|
|
|
|
NAME='minecraft-pi-reborn'
|
2022-07-04 20:51:56 +00:00
|
|
|
BRANCH='master'
|
2021-06-17 21:32:24 +00:00
|
|
|
|
2022-07-04 20:44:00 +00:00
|
|
|
# Build
|
|
|
|
./scripts/setup.sh "$1" "$2" -DMCPI_IS_APPIMAGE_BUILD=ON
|
|
|
|
./scripts/build.sh "$1" "$2"
|
|
|
|
|
|
|
|
# Download Runtime
|
|
|
|
mkdir -p build/appimage
|
|
|
|
if [ ! -f "build/appimage/runtime-$2" ]; then
|
2022-07-07 04:37:53 +00:00
|
|
|
case "$2" in
|
|
|
|
'armhf') RUNTIME_ARCH='armhf';;
|
|
|
|
'arm64') RUNTIME_ARCH='aarch64';;
|
|
|
|
'i386') RUNTIME_ARCH='i686';;
|
|
|
|
'amd64') RUNTIME_ARCH='x86_64';;
|
|
|
|
esac
|
2022-07-04 20:44:00 +00:00
|
|
|
wget -O "build/appimage/runtime-$2" "https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-${RUNTIME_ARCH}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Package
|
2022-07-07 04:37:53 +00:00
|
|
|
case "$2" in
|
|
|
|
'armhf') APPIMAGE_ARCH='arm';;
|
|
|
|
'arm64') APPIMAGE_ARCH='arm_aarch64';;
|
|
|
|
'i386') APPIMAGE_ARCH='i686';;
|
|
|
|
'amd64') APPIMAGE_ARCH='x86_64';;
|
|
|
|
esac
|
|
|
|
ARCH="${APPIMAGE_ARCH}" appimagetool \
|
2022-07-04 20:51:56 +00:00
|
|
|
--updateinformation "zsync|https://jenkins.thebrokenrail.com/job/minecraft-pi-reborn/job/${BRANCH}/lastSuccessfulBuild/artifact/out/${NAME}-latest-$2.AppImage.zsync" \
|
2022-07-04 20:44:00 +00:00
|
|
|
--runtime-file "build/appimage/runtime-$2" \
|
|
|
|
--comp xz \
|
|
|
|
"./out/$1-$2" \
|
|
|
|
"./out/${NAME}-$1-$(cat VERSION)-$2.AppImage"
|
2022-03-10 02:23:41 +00:00
|
|
|
|
|
|
|
# Move ZSync
|
2022-07-04 20:44:00 +00:00
|
|
|
rm -f "./out/${NAME}-$1-latest-$2.AppImage.zsync"
|
|
|
|
mv "./${NAME}-$1-$(cat VERSION)-$2.AppImage.zsync" "./out/${NAME}-$1-latest-$2.AppImage.zsync"
|