amogusspecialsauce/build.sh

32 lines
891 B
Bash
Raw Normal View History

2023-08-20 16:28:06 +00:00
#!/bin/bash
2023-08-19 22:57:04 +00:00
base=xonotic-data.pk3dir
2023-08-19 21:01:22 +00:00
2023-08-20 14:02:21 +00:00
# Apply specialsauce
cp -R xonoticspecialsauce/* xonotic-data.pk3dir
2023-08-19 21:01:22 +00:00
: ${PROGS_OUT:=$PWD}
export PROGS_OUT
stamp=$(date +"%s")
: ${QCC:=$PWD/gmqcc/gmqcc}
export QCC
export QCCFLAGS_WATERMARK="xonotic-$stamp"
export XONOTIC=1
make -C ${base}
2023-08-19 22:42:06 +00:00
echo "Compiled successfully!";
2023-08-19 21:01:22 +00:00
mkdir -vp $(dirname "$0")/compiled
2023-08-19 22:57:04 +00:00
mv -v *.dat $(dirname "$0")/compiled
rm *.lno
2023-08-20 14:06:52 +00:00
mkdir dist
2023-08-20 16:28:06 +00:00
if [[ -n "${DRONE_TAG}" ]]
then
2023-08-20 16:47:00 +00:00
echo "Making ready for Tag: ${DRONE_TAG}"
zip -9 dist/compiled-${DRONE_TAG}.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
2023-08-20 16:28:06 +00:00
elif [[ -n "${DRONE_COMMIT_SHA}" ]]
then
2023-08-20 16:47:00 +00:00
echo "Making ready for Commit: ${DRONE_COMMIT_SHA:0:10}"
zip -9 dist/compiled-${DRONE_COMMIT_SHA:0:10}.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
2023-08-20 14:02:21 +00:00
else
2023-08-20 16:28:06 +00:00
zip -9 dist/compiled.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
2023-08-20 14:02:21 +00:00
fi