#!/bin/sh -ex GITID=$(git rev-parse HEAD) if [ "$(uname)" = "Darwin" ]; then TMPDIR=/tmp/enterprise-build rm -Rf $TMPDIR mkdir -p $TMPDIR else TMPDIR=$(mktemp -d) fi TMP_CHECKOUT=$TMPDIR/zulip-server/ TARBALL=$TMPDIR/zulip-server.tar # .gitattributes lists the files that are not exported git archive -o $TARBALL --prefix=zulip-server/ HEAD # Check out a temporary full copy of the index to generate static files git checkout-index -f -a --prefix $TMP_CHECKOUT cd $TMP_CHECKOUT # Use default settings so there is no chance of leaking secrets cp zproject/local_settings_template.py zproject/local_settings.py # Some settings need values for it to work cat >> zproject/local_settings.py < version_id mv update-prod-static.log .. cd $TMPDIR tar --append -f $TARBALL zulip-server/prod-static zulip-server/version_id rm -r zulip-server gzip $TARBALL echo "Generated $TARBALL.gz"