Generate a versioned tarball during package creation.

This commit is contained in:
Paul Chote
2017-11-12 12:42:40 +00:00
committed by abcdefg30
parent 8ce460ad8c
commit 7c901c27f1
3 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#!/bin/bash
# OpenRA packaging script for versioned source tarball
if [ $# -ne "2" ]; then
echo "Usage: `basename $0` tag outputdir"
exit 1
fi
# Set the working dir to the location of this script
cd $(dirname $0)
TAG="$1"
OUTPUTDIR="$2"
SRCDIR="$(pwd)/../.."
pushd ${SRCDIR} > /dev/null
make version VERSION="${TAG}"
git ls-tree HEAD --name-only -r -z | xargs -0 tar cvjf "${OUTPUTDIR}/OpenRA-${TAG}-source.tar.bz2"
popd > /dev/null