dragonblocks_alpha/snapshot.sh

23 lines
556 B
Bash
Raw Normal View History

2021-03-31 09:00:09 -07:00
#! /bin/bash
mkdir .build
cp -r * .build/
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
exit 1
fi
2021-03-31 09:00:09 -07:00
cp Dragonblocks DragonblocksServer ..
cd ..
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