mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
build-local-server-tarball: Add prod-static to a clean git archive tarball
This avoids exporting .pyc files and any other junk left behind by the build process. (imported from commit 8bdb9de3867b10eb5be9f52b784aa906c5f19d23)
This commit is contained in:
13
.gitattributes
vendored
Normal file
13
.gitattributes
vendored
Normal file
@@ -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
|
||||||
@@ -10,38 +10,27 @@ else
|
|||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIR=$TMPDIR/zulip-server/
|
TMP_CHECKOUT=$TMPDIR/zulip-server/
|
||||||
TARBALL=$TMPDIR/zulip-server.tar.gz
|
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.
|
# update-prod-static generates the prod-static directory.
|
||||||
# See COLLECTSTATIC in settings.py
|
# See COLLECTSTATIC in settings.py
|
||||||
./tools/update-prod-static
|
./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
|
echo $GITID > version_id
|
||||||
mv update-prod-static.log ..
|
mv update-prod-static.log ..
|
||||||
|
|
||||||
cd ..
|
cd $TMPDIR
|
||||||
tar -czf $TARBALL zulip-server
|
|
||||||
|
tar --append -f $TARBALL zulip-server/prod-static zulip-server/version_id
|
||||||
|
|
||||||
rm -r zulip-server
|
rm -r zulip-server
|
||||||
echo "Generated $TARBALL"
|
|
||||||
|
gzip $TARBALL
|
||||||
|
echo "Generated $TARBALL.gz"
|
||||||
|
|||||||
Reference in New Issue
Block a user