#!/bin/bash base=xonotic-data.pk3dir # Apply specialsauce cp -R xonoticspecialsauce/* xonotic-data.pk3dir : ${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} echo "Compiled successfully!"; mkdir -vp $(dirname "$0")/compiled mv -v *.dat $(dirname "$0")/compiled rm *.lno mkdir dist if [[ -n "${DRONE_TAG}" ]] then echo "Making ready for Tag: ${DRONE_TAG}" zip -9 dist/compiled-${DRONE_TAG}.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat elif [[ -n "${DRONE_COMMIT_SHA}" ]] then COMMIT_SHA = ${DRONE_COMMIT_SHA:0:10} 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 else zip -9 dist/compiled.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat fi