Files
zulip/tools/build-local-server-tarball
Steve Howell c11cc80f60 Make build-local-server-tarball work on OSX.
(imported from commit ae0853882181e2489679f8c6870461fab6cb29b4)
2013-11-06 13:49:00 -05:00

48 lines
750 B
Bash
Executable File

#!/bin/sh -ex
GITID=$(git rev-parse HEAD)
if [ "$(uname)" = "Darwin" ]; then
TMPDIR=/tmp/local-server
rm -Rf $TMPDIR
mkdir -p $TMPDIR
else
TMPDIR=$(mktemp -d)
fi
DIR=$TMPDIR/zulip-server/
TARBALL=$TMPDIR/zulip-server.tar.gz
git checkout-index -f -a --prefix $DIR
cd $DIR
# update-prod-static generates the prod-static directory.
# See COLLECTSTATIC in settings.py
./tools/update-prod-static
xargs rm -r <<EOF
analytics
assets
bots
corporate
static
tools
zilencer
.gitignore
templates/.gitignore
templates/analytics
templates/corporate
puppet/zulip_internal
zproject/local_settings.py
EOF
echo $GITID > version_id
mv update-prod-static.log ..
cd ..
tar -czf $TARBALL zulip-server
rm -r zulip-server
echo "Generated $TARBALL"