diff --git a/.travis.yml b/.travis.yml index 2842355803..15b23f98d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,6 +78,7 @@ deploy: file: - build/OpenRA-${TRAVIS_TAG}.exe - build/OpenRA-${TRAVIS_TAG}.dmg + - build/OpenRA-${TRAVIS_TAG}-source.tar.bz2 - build/openra_${DOTVERSION}_all.deb skip_cleanup: true on: diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 7819934c72..d9d10b3dee 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -30,5 +30,6 @@ set -e build_package windows build_package osx build_package linux +build_package source echo "Package build done." diff --git a/packaging/source/buildpackage.sh b/packaging/source/buildpackage.sh new file mode 100755 index 0000000000..01a996edbc --- /dev/null +++ b/packaging/source/buildpackage.sh @@ -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