2021-03-31 09:00:09 -07:00
|
|
|
#! /bin/bash
|
|
|
|
mkdir .build
|
|
|
|
cp -r * .build/
|
2021-07-16 05:16:24 -07:00
|
|
|
cd .build/
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
if ! (cmake -B . -S ../src -DCMAKE_BUILD_TYPE=Release && make clean && make -j$(nproc)); then
|
|
|
|
cd ../..
|
|
|
|
rm -rf .build
|
2021-04-01 08:37:35 -07:00
|
|
|
exit 1
|
|
|
|
fi
|
2021-03-31 09:00:09 -07:00
|
|
|
cp Dragonblocks DragonblocksServer ..
|
|
|
|
cd ..
|
2021-07-16 05:16:24 -07:00
|
|
|
rm -rf .git* deps src build BUILDING.md snapshot.sh upload.sh DragonblocksAlpha-*.zip
|
2021-03-31 09:00:09 -07:00
|
|
|
cd ..
|
|
|
|
mv .build DragonblocksAlpha
|
|
|
|
VERSION=`git tag --points-at HEAD`
|
|
|
|
if [[ $VERSION = "" ]]; then
|
|
|
|
VERSION=`git rev-parse --short HEAD`
|
|
|
|
fi
|
|
|
|
zip -r DragonblocksAlpha-$VERSION.zip DragonblocksAlpha/*
|
|
|
|
rm -rf DragonblocksAlpha
|