diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..a269ff76bd --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +.gitignore export-ignore +.gitattributes export-ignore +analytics/ export-ignore +assets/ export-ignore +bots/ export-ignore +corporate/ export-ignore +static/ export-ignore +tools/ export-ignore +zilencer/ export-ignore +templates/analytics/ export-ignore +templates/corporate/ export-ignore +puppet/zulip_internal/ export-ignore +zproject/local_settings.py export-ignore diff --git a/tools/build-local-server-tarball b/tools/build-local-server-tarball index e069e6b443..12b03c0d41 100755 --- a/tools/build-local-server-tarball +++ b/tools/build-local-server-tarball @@ -10,38 +10,27 @@ else TMPDIR=$(mktemp -d) fi -DIR=$TMPDIR/zulip-server/ -TARBALL=$TMPDIR/zulip-server.tar.gz +TMP_CHECKOUT=$TMPDIR/zulip-server/ +TARBALL=$TMPDIR/zulip-server.tar -git checkout-index -f -a --prefix $DIR +# .gitattributes lists the files that are not exported +git archive -o $TARBALL --prefix=zulip-server/ HEAD -cd $DIR +# Check out a temporary full copy of the index to generate static files +git checkout-index -f -a --prefix $TMP_CHECKOUT +cd $TMP_CHECKOUT # update-prod-static generates the prod-static directory. # See COLLECTSTATIC in settings.py ./tools/update-prod-static - -xargs rm -r < version_id mv update-prod-static.log .. -cd .. -tar -czf $TARBALL zulip-server +cd $TMPDIR + +tar --append -f $TARBALL zulip-server/prod-static zulip-server/version_id rm -r zulip-server -echo "Generated $TARBALL" + +gzip $TARBALL +echo "Generated $TARBALL.gz"